name: Rust CI
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
checks:
name: Format, lint, test, and audit
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Install Rust toolchain
run: rustup show
- name: Cache Rust build output
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 with:
cache-on-failure: true
- name: Install security tools
uses: taiki-e/install-action@873c7452cadb7c034694a1282227095d93fbdf92 with:
tool: cargo-deny,cargo-audit
- name: Run project checks
run: scripts/checks.sh