1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
name: CI

on:
  push:
    branches: [main]
  pull_request:

permissions: {}

jobs:
  ci:
    runs-on: ubuntu-latest
    permissions:
      contents: read # checkout.
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
        with:
          persist-credentials: false
      # The dev shell supplies cargo, clippy, grcov, just, ruby, and jj; the
      # native tests spawn real jj, so it has to be on PATH.
      - uses: DeterminateSystems/determinate-nix-action@4b040423529d49b1a19ba918742e0aa9aa95031a # v3.24.3
      # jj refuses to snapshot without an identity; the tests need nothing else.
      - name: Configure jj
        run: |
          printf '[user]\nname = "CI"\nemail = "ci@example.com"\n' > "${RUNNER_TEMP}/jj-config.toml"
          echo "JJ_CONFIG=${RUNNER_TEMP}/jj-config.toml" >> "$GITHUB_ENV"
      - run: nix develop --command cargo fmt --all --check
      - run: nix develop --command just clippy coverage parity
      # Mutation testing runs locally via `just mutants` — too slow for CI.