name: Quality
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.sha }}
cancel-in-progress: true
jobs:
quality:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-15
- macos-15-intel
steps:
- name: Check out repository
uses: actions/checkout@v5
- name: Install pinned Rust toolchain
run: rustup toolchain install 1.88.0 --profile minimal --component rustfmt --component clippy
- name: Check Rust formatting
run: cargo +1.88.0 fmt --check
- name: Lint Rust workspace
run: cargo +1.88.0 clippy --workspace --all-targets -- -D warnings
- name: Test Rust workspace
run: cargo +1.88.0 test --workspace --locked
coverage:
name: Rust coverage
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v5
- name: Install pinned Rust toolchain
run: rustup toolchain install 1.88.0 --profile minimal --component llvm-tools-preview
- name: Install coverage tool
run: cargo +1.88.0 install --locked cargo-llvm-cov --version 0.8.7
- name: Generate coverage report
run: cargo +1.88.0 llvm-cov --workspace --locked --lcov --output-path lcov.info
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: rust-coverage
path: lcov.info
if-no-files-found: error