Fix/ci hardening #9
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: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| check: | |
| name: Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a # stable 2025-01-30 | |
| with: | |
| components: rustfmt, clippy | |
| - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8 | |
| - name: Format check | |
| run: cargo fmt --check | |
| - name: Clippy | |
| run: cargo clippy --all-targets | |
| env: | |
| RUSTFLAGS: "-Dwarnings" | |
| - name: Build | |
| run: cargo build | |
| - name: Test | |
| run: cargo test | |
| - name: Security audit | |
| run: cargo install cargo-audit --locked && cargo audit | |
| - name: Install rustqual | |
| run: cargo install rustqual --version =0.4.6 --locked | |
| - name: Quality analysis | |
| run: rustqual src/ --fail-on-warnings |