ci: run the suite in the nix dev shell
The native tests spawn real jj and the parity suite needs ruby, so both come from the flake's dev shell.
Task: CI has the tools the tests need
Done looks like: .github/workflows/ci.yml runs a job where the native tests (which spawn real jj and send SIGINT via kill) and `just parity` (which needs ruby) can pass, e.g. by running inside the nix dev shell or installing jujutsu and ruby. actionlint passes. The workflows aren't run here; verify by reading the job's setup against what `just all` and `just parity` invoke.
Assisted-by: Claude Sonnet 5.5 via Claude Code
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..5e0c56b
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,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.