Skip to content

Commit

Permalink
Replace rust cache in rust-clippy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
andrzejressel committed Mar 9, 2024
1 parent a85802d commit 2ea29b3
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 23 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
with:
prefix-key: "v0-rust-build"
- uses: actions/setup-go@v5
with:
go-version: '^1.22.0'
Expand Down
48 changes: 25 additions & 23 deletions .github/workflows/rust-clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,31 @@ 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@v2
- name: Checkout code
uses: actions/checkout@v2

- uses: Swatinem/rust-cache@v2
- uses: Swatinem/rust-cache@v2
with:
prefix-key: "v0-rust-clippy"

- 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: 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@v1
with:
sarif_file: rust-clippy-results.sarif
wait-for-processing: true
- name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: rust-clippy-results.sarif
wait-for-processing: true

0 comments on commit 2ea29b3

Please sign in to comment.