Skip to content

Fix clippy and enable test checking #2569

Fix clippy and enable test checking

Fix clippy and enable test checking #2569

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# rust-clippy is a tool that runs a bunch of lints to catch common
# mistakes in your Rust code and help improve your Rust code.
# More details at https://github.com/rust-lang/rust-clippy
# and https://rust-lang.github.io/rust-clippy/
name: rust-clippy analyze
on:
push:
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
schedule:
- cron: '0 22 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
rust-clippy-analyze:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-24.04
# - windows-2022 Windows has mixed paths that mess GitHub reader up (https://github.com/github/codeql/issues/15209)
- macos-14
name: Run rust-clippy analyzing
permissions:
contents: read
security-events: write
steps:
- run: git config --system core.longpaths true
if: runner.os == 'Windows'
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
submodules: true
- uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
version: "25.3"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: extractions/setup-just@dd310ad5a97d8e7b41793f8ef055398d51ad4de6 # v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install required cargo
run: |
cargo install clippy-sarif || clippy-sarif --version
cargo install sarif-fmt || sarif-fmt --version
- run: brew install pulumi
if: runner.os == 'macOS'
- run: pulumi version
- run: pulumi login --local
- name: Prerun clippy
run: just clippy
- name: Run rust-clippy
run: just clippy-to-file
- name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3
with:
sarif_file: rust-clippy-results.sarif
wait-for-processing: true
category: Rust-${{ runner.os }}