name: "Rust checks"
on:
pull_request:
branches: [main]
permissions:
contents: read
actions: read
env:
RUSTFLAGS: "-D warnings" jobs:
check:
runs-on: [nixos]
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
steps:
- name: checkout-code
uses: actions/checkout@v4
- name: nix-flake-check
run: nix flake check
- name: yamlfmt
run: nix develop --command yamlfmt -lint .
- name: nix-deadnix
run: nix develop --command deadnix
- name: nix-statix
run: nix develop --command statix check
- name: nix-alejandra
run: nix develop --command alejandra --check .
- name: taplo-fmt
run: nix develop --command taplo fmt --check
- name: cargo-fmt
run: nix develop --command cargo fmt --check
- name: cargo-check
run: nix develop --command cargo check
- name: cargo-test
run: nix develop --command cargo test
- name: cargo-bench
run: nix develop --command cargo bench --no-run - name: cargo-doc
run: nix develop --command cargo doc