Add Clippy to CI Workflow #22
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ci | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: 1.82 | |
| components: clippy | |
| - name: Install Dependencies | |
| run: sudo apt-get update && sudo apt-get install -y libudev-dev | |
| - run: cargo clippy --all-targets --no-deps -- -D warnings | |
| test: | |
| name: Test with Rust ${{matrix.rust-version}} | |
| runs-on: ubuntu-latest | |
| needs: clippy | |
| strategy: | |
| matrix: | |
| rust-version: [1.82, stable] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ matrix.rust-version }} | |
| - name: Install Dependencies | |
| run: sudo apt-get update && sudo apt-get install -y libudev-dev | |
| - uses: cargo-bins/cargo-binstall@main | |
| - name: Install cargo nextest | |
| run: cargo binstall cargo-nextest --secure --no-confirm --disable-telemetry | |
| - run: cargo nextest run --workspace |