From 6884a2b4c70f01fbcfb07bf6614d41426fb94171 Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Mon, 27 Jul 2026 14:51:09 +0100 Subject: [PATCH] fix(ci): install jq in the container so the Trope IR test actually runs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `CI / required` failed at "Validate repository contracts" with exit code 2 and a single line of output: jq is required That comes from tests/check-examples.sh:15, which exits 2 when jq is absent. The pinned idris2-pack image does not ship it, so the Trope IR conformance test — the one that asserts every example lowers to valid Trope IR — has never actually executed in CI. It bailed before testing anything. This is the same class of problem as the missing xz fixed in #28, so the step now handles both: it collects what is missing, installs in one apt-get pass, and prints both versions so the log records what was used. Already-provisioned images skip the install entirely. Verified against origin/main (d29f89e) in a local checkout: all four contract scripts exit 0, and `bash -n` parses every .sh under tests/ and scripts/. tests/check-examples.sh ................. exit 0 (examples 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 Co-Authored-By: Claude Opus 5 --- .github/workflows/ci.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b048d00..778b33e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,17 +27,24 @@ jobs: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - # The pinned idris2-pack image ships no xz binary, so setup-zig's - # .tar.xz download fails with "tar (child): xz: Cannot exec". - - name: Install xz (needed to unpack the Zig tarball) + # The pinned idris2-pack image is minimal. Two things are missing: + # xz — setup-zig's .tar.xz download dies with "tar: xz: Cannot exec" + # jq — tests/check-examples.sh exits 2 with "jq is required", so the + # Trope IR conformance test never actually ran in CI + - name: Install container prerequisites (xz, jq) shell: bash run: | set -euo pipefail - if ! command -v xz >/dev/null 2>&1; then + missing=() + command -v xz >/dev/null 2>&1 || missing+=(xz-utils) + command -v jq >/dev/null 2>&1 || missing+=(jq) + if [ "${#missing[@]}" -gt 0 ]; then + echo "installing: ${missing[*]}" apt-get update -qq - apt-get install -y -qq --no-install-recommends xz-utils + apt-get install -y -qq --no-install-recommends "${missing[@]}" fi xz --version | head -1 + jq --version - name: Set up Zig uses: goto-bus-stop/setup-zig@abea47f85e598557f500fa1fd2ab7464fcb39406 # v2.2.1