Skip to content

Commit

Permalink
Merge pull request #23 from andrzejressel/rust-clippy-rust-cache
Browse files Browse the repository at this point in the history
Replace rust cache in rust-clippy.yml
  • Loading branch information
mergify[bot] authored Mar 9, 2024
2 parents a766f70 + 039cc22 commit b8f2c09
Showing 1 changed file with 23 additions and 39 deletions.
62 changes: 23 additions & 39 deletions .github/workflows/rust-clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,42 +27,26 @@ jobs:
security-events: write
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
steps:
- name: Checkout code
uses: actions/checkout@v4

- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-clippy-${{ hashFiles('**/Cargo.lock') }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-clippy-${{ hashFiles('**/Cargo.lock') }}-
${{ runner.os }}-clippy-
${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ github.sha }}
${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-
${{ runner.os }}-cargo-
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
version: "25.3"
- name: Install required cargo
run: |
cargo install clippy-sarif || clippy-sarif --version
cargo install sarif-fmt || sarif-fmt --version
- name: Run rust-clippy
run:
cargo clippy
--all
--all-features
--message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
continue-on-error: true

- name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: rust-clippy-results.sarif
wait-for-processing: true
- name: Checkout code
uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
version: "25.3"
- name: Install required cargo
run: |
cargo install clippy-sarif || clippy-sarif --version
cargo install sarif-fmt || sarif-fmt --version
- name: Run rust-clippy
run:
cargo clippy
--all
--all-features
--message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
continue-on-error: true
- name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: rust-clippy-results.sarif
wait-for-processing: true

0 comments on commit b8f2c09

Please sign in to comment.