Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(rust.yml/jobs/clippy): integrate with GitHub Code Scanning #417

Closed
wants to merge 7 commits into from
16 changes: 14 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,14 @@ jobs:
steps:
- uses: actions/checkout@v4
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- run: cargo install clippy-sarif
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --all-targets --all-features
- run: cargo clippy --all-targets --all-features --message-format=json | clippy-sarif | tee results.sarif
- name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@v3
if: success() || failure()
with:
sarif_file: results.sarif
build_and_test:
name: Build project and test
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -77,4 +83,10 @@ jobs:
- uses: actions/checkout@v4
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --release --all-targets --all-features
- run: cargo install clippy-sarif
- run: cargo clippy --release --all-targets --all-features --message-format=json | clippy-sarif | tee results.sarif
- name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@v3
if: success() || failure()
with:
sarif_file: results.sarif
Loading