Documentation
name: CI
on:
  push:
    branches:
    - main
  pull_request:

defaults:
  run:
    shell: bash

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - run: cargo fmt --check
    - name: Deps
      run: |
        rustup update
        rustup component add clippy
    - uses: Swatinem/rust-cache@v2
    - name: Lint
      run: cargo clippy -- --deny warnings
    - run: env RUSTFLAGS="@$PWD/rustc-flags" cargo test --locked --no-run
    - run: env RUSTFLAGS="@$PWD/rustc-flags" cargo test