v0.2.0 #15
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: CHECK | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - "**" | |
| jobs: | |
| cargo: | |
| name: Cargo | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| security-events: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| components: clippy, rustfmt | |
| - name: Setup cache | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Cargo test | |
| run: cargo test | |
| - name: Cargo fmt | |
| run: cargo fmt -- --check | |
| - name: typos check | |
| run: | | |
| cargo install typos-cli | |
| typos | |
| - name: Cargo clippy | |
| run: cargo clippy --all-targets --all-features --message-format=json > clippy_result.json | |
| continue-on-error: true | |
| - name: Install clippy-sarif sarif-fmt (require cargo) | |
| run: | | |
| cargo install clippy-sarif sarif-fmt | |
| cat clippy_result.json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt | |
| - name: Upload analysis results to GitHub | |
| uses: github/codeql-action/upload-sarif@v4 | |
| with: | |
| sarif_file: rust-clippy-results.sarif | |
| wait-for-processing: true |