name: CI
on:
push:
branches: [main]
pull_request:
workflow_call:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
test:
runs-on: ubuntu-26.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec with:
components: rustfmt, clippy
- run: cargo fmt --all --check
- run: cargo clippy --workspace --all-targets --locked -- -D warnings
- run: cargo clippy --lib --locked --features fuzzing -- -D warnings
- run: cargo doc --workspace --no-deps --locked
env:
RUSTDOCFLAGS: -D warnings
- run: cargo test --workspace --locked
msrv:
runs-on: ubuntu-26.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@360a4e93673de6630fac2478bc9e35244b01a759 - run: cargo check --workspace --all-targets --locked
vocab:
runs-on: ubuntu-26.04
steps:
- uses: actions/checkout@v4
- id: pin
run: echo "toolchain=$(cat data/std/TOOLCHAIN)" >> "$GITHUB_OUTPUT"
- uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 with:
toolchain: ${{ steps.pin.outputs.toolchain }}
components: rust-docs-json
- run: cargo xtask vocab
- run: |
git status --porcelain -- data
git diff --exit-code -- data
test -z "$(git status --porcelain -- data)"