Skip to content

🚀 Major Quality Improvements: Security, Performance & Test Coverage #108

🚀 Major Quality Improvements: Security, Performance & Test Coverage

🚀 Major Quality Improvements: Security, Performance & Test Coverage #108

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:
branches: [ "main" ]
schedule:
- cron: '39 17 * * 6'
env:
RUSTFLAGS: "-D warnings"
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10
# Cancel previous runs on new push
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
rust-clippy-analyze:
name: Run rust-clippy analyzing
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: read
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
- name: Install Rust nightly
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt, clippy
- name: Cache Cargo
uses: Swatinem/rust-cache@v2
with:
shared-key: "clippy"
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Install required cargo
run: cargo install clippy-sarif sarif-fmt
# First check: strict workspace-wide clippy
- name: Run clippy (strict mode)
run: |
echo "Running clippy with Rust nightly for GAT zero-cost abstractions"
rustc --version
cargo clippy --workspace --all-targets --features "schema-validation,compression,http-server" -- -D warnings
continue-on-error: true
# Second check: SARIF format for GitHub Security
- name: Run rust-clippy (SARIF)
run: |
cargo clippy --workspace --features "schema-validation,compression,http-server" --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