Skip to content

Commit 481e11b

Browse files
fix(ci): install jq in the container so the Trope IR test actually runs (#32)
`CI / required` is the last red check on `main`. After #31 fixed the version assert, the job got two steps further and now fails at **Validate repository contracts** with exit code 2 and one line of output: ``` jq is required ``` ## Root cause `tests/check-examples.sh:15`: ```bash command -v jq >/dev/null || { echo "jq is required"; exit 2; } ``` The pinned `idris2-pack` image does not ship `jq`. So the **Trope IR conformance test — the one asserting every example lowers to valid Trope IR — has never actually executed in CI.** It bailed before testing anything. That makes this more than a build fix: it turns a step that always died early into one that genuinely exercises the language's core guarantee. ## Fix Same class of problem as the missing `xz` in #28, so the step now handles both: collect what is absent, install in a single `apt-get` pass, print both versions so the log records what ran. A no-op on images that already have them. ## Verified locally against `origin/main` (d29f89e) ``` bash -n over tests/ scripts/ ............... all parse tests/check-examples.sh .................... exit 0 → "examples: all lower to valid Trope IR" tests/aspect_tests.sh ...................... exit 0 → PASS=3 FAIL=0 WARN=0 scripts/check-root-shape.sh ................ exit 0 → 45 entries, 46 permitted tests/workflows/validate_workflows_test.sh . exit 0 → Workflow validation PASSED ``` Note `check-examples.sh` skips the verdict round-trip when no sibling `tropecheck` binary is built — that part still needs `trope-checker`, and is reported as a `note`, not a pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent d29f89e commit 481e11b

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,24 @@ jobs:
2727
- name: Checkout
2828
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2929

30-
# The pinned idris2-pack image ships no xz binary, so setup-zig's
31-
# .tar.xz download fails with "tar (child): xz: Cannot exec".
32-
- name: Install xz (needed to unpack the Zig tarball)
30+
# The pinned idris2-pack image is minimal. Two things are missing:
31+
# xz — setup-zig's .tar.xz download dies with "tar: xz: Cannot exec"
32+
# jq — tests/check-examples.sh exits 2 with "jq is required", so the
33+
# Trope IR conformance test never actually ran in CI
34+
- name: Install container prerequisites (xz, jq)
3335
shell: bash
3436
run: |
3537
set -euo pipefail
36-
if ! command -v xz >/dev/null 2>&1; then
38+
missing=()
39+
command -v xz >/dev/null 2>&1 || missing+=(xz-utils)
40+
command -v jq >/dev/null 2>&1 || missing+=(jq)
41+
if [ "${#missing[@]}" -gt 0 ]; then
42+
echo "installing: ${missing[*]}"
3743
apt-get update -qq
38-
apt-get install -y -qq --no-install-recommends xz-utils
44+
apt-get install -y -qq --no-install-recommends "${missing[@]}"
3945
fi
4046
xz --version | head -1
47+
jq --version
4148
4249
- name: Set up Zig
4350
uses: goto-bus-stop/setup-zig@abea47f85e598557f500fa1fd2ab7464fcb39406 # v2.2.1

0 commit comments

Comments
 (0)