diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d30a1fa..ea6ebce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,6 +40,30 @@ jobs: cachix-cache: ${{ vars.CACHIX_CACHE }} cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }} + - name: Confirm a registered test failure makes ASDF fail + shell: bash + run: | + log="$RUNNER_TEMP/asdf-control.log" + set +e + nix develop --command sbcl --noinform --non-interactive \ + --eval '(require :asdf)' \ + --eval '(load "scripts/dependency-roots.lisp")' \ + --eval '(initialize-dependency-source-registry)' \ + --eval '(asdf:load-asd (truename "cl-cc-javascript.asd"))' \ + --eval '(asdf:test-system "cl-cc-javascript")' > "$log" 2>&1 + status=$? + set -e + cat "$log" + if [ "$status" -eq 0 ]; then + echo "::error::ASDF unexpectedly accepted the intentional test failure." + exit 1 + fi + if ! grep -Fq "cl-cc-javascript tests failed" "$log"; then + echo "::error::ASDF failed before the test system reported its expected failure." + exit 1 + fi + echo "Observed the expected ASDF failure (exit $status)." + # Runs the SBCL test suite (checks.default), the treefmt formatting gate # (checks.formatting), and the mkdocs --strict build (checks.docs). # Add `--all-systems` only when the flake declares more than one system. diff --git a/t/e2e-ast-test.lisp b/t/e2e-ast-test.lisp index 34cdc38..b6031d1 100644 --- a/t/e2e-ast-test.lisp +++ b/t/e2e-ast-test.lisp @@ -340,3 +340,8 @@ const upper = user?.profile?.address?.city?.toUpperCase(); (equal (optional-chain-keys (first upper-args)) '("profile" "address" "city"))) :to-be-truthy))))) + +;;; W2-23 control: verify that one registered failure makes ASDF fail. + +(it-sequential "js-e2e-control-intentional-failure" + (expect nil :to-be-truthy))