name: Check
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-Dwarnings"
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Install cargo tools
uses: taiki-e/install-action@v2
with:
tool: cargo-audit,cargo-nextest,cargo-machete,cargo-tarpaulin
- name: Audit
run: cargo audit
- name: Unused dependency check
run: cargo machete
- name: Format check
run: cargo fmt --all -- --check
- name: Static analysis
run: cargo clippy --all-targets --all-features
- name: Test
run: cargo nextest run --workspace --all-targets --all-features