Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Elvis339 committed Oct 6, 2024
1 parent 1d87cda commit 7c79831
Showing 1 changed file with 20 additions and 23 deletions.
43 changes: 20 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,51 @@ on: [push, pull_request]
name: CI

jobs:
setup:
name: Setup and Check Toolchain
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy, rustfmt

- name: Display Rust version
run: rustc --version

check:
name: Check Workspace
runs-on: ubuntu-latest
needs: setup
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Run cargo check for all workspace members
- name: Run cargo check
run: cargo check --workspace --all-targets

test:
name: Run Test Suite
name: Test Suite
runs-on: ubuntu-latest
needs: setup
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Run tests for all workspace members
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable

- name: Run cargo test
run: cargo test --workspace --all-targets

lints:
name: Run Lints
name: Lints
runs-on: ubuntu-latest
needs: setup
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Install stable toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt, clippy

- name: Run cargo fmt
run: cargo fmt --all -- --check

- name: Run clippy
- name: Run cargo clippy
run: cargo clippy --workspace --all-targets -- -D warnings

0 comments on commit 7c79831

Please sign in to comment.