ci: use bookworm #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Audit & Format | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
- develop | |
- rc/next | |
- ci/revamp | |
workflow_dispatch: | |
# Cancel previous runs for the same workflow | |
concurrency: | |
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" | |
cancel-in-progress: true | |
jobs: | |
audit: | |
name: Audit and format | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install Rust toolchain | |
run: | | |
rustup set profile minimal | |
rustup toolchain install stable --component rustfmt | |
rustup override set stable | |
- name: Cache cargo | |
id: cache-cargo | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-audit-${{ hashFiles('**/Cargo.lock') }} | |
- name: Install dependencies | |
if: steps.cache-cargo.outputs.cache-hit != 'true' | |
run: cargo install cargo-audit | |
# This can only be ran in root dir | |
- name: Run audit | |
run: cargo audit --ignore RUSTSEC-2021-0076 --ignore RUSTSEC-2022-0028 --ignore RUSTSEC-2020-0071 --ignore RUSTSEC-2022-0090 --ignore RUSTSEC-2023-0018 | |
- name: Run rustfmt | |
run: cargo fmt --all -- --check |