Add cargo deny, lints and test workflows #3
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: Rust Lints | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: rust-lints-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_LOG: "error" | |
| RUST_BACKTRACE: short | |
| CARGO_INCREMENTAL: 0 | |
| jobs: | |
| rustfmt: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | |
| - name: Install latest nightly | |
| run: rustup toolchain install nightly --component rustfmt --allow-downgrade | |
| - name: Check Rust formatting | |
| run: cargo +nightly fmt -- --check | |
| clippy: | |
| needs: | |
| - rustfmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | |
| - name: Install Rust Clippy | |
| run: rustup component add clippy | |
| - name: Run Clippy Linter | |
| run: cargo clippy -- -D warnings |