name: ci
on:
push:
branches:
pull_request:
permissions:
contents: read
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup update stable && rustup default stable
- run: rustup component add rustfmt clippy
- run: cargo fmt --check
# --all-features so the opt-in --audit code (spdx detection) is linted and tested too
- run: cargo clippy --all-targets --all-features -- -D warnings
- run: cargo test --all-features
# dogfood with the default (lean) features: the committed output stays current
- run: cargo run -- --check