Files
netwatch/script/frontend-test
clawbot e5db494187
check / check (push) Successful in 6m51s
CI time limit on the step; no timeout in Dockerfile or scripts (closes #199)
The runner ignores a job's `timeout-minutes`, so the 20-minute limit moves to the step that runs `script/cibuild`. The `Dockerfile`, `script/frontend-test` and `script/frontend-viewport-test` drop their `timeout` wrappers, which also stopped `make check` outside CI. `go test -timeout 90s` stays, as `REPO_POLICIES.md` requires it.

Deviation: `REPO_POLICIES.md`, vendored from `sneak/prompts`, still says the job sets the limit.

Model: opus-5-5
2026-11-10 21:22:26 +01:00

28 lines
1.0 KiB
Bash
Executable File

#!/bin/sh
# script/frontend-test: run the frontend test suite on the host: the
# unit tests in test/unit/, through the test script in package.json,
# then the production build, which fails on broken code. make test runs
# the same tests in the frontend-test stage of Dockerfile, and the image
# build runs the production build in its frontend-build stage. The tests
# print a dot each; if any fails, they run again with every test listed,
# and the script fails even if that run passes. NODE_OPTIONS chooses the
# reporter because yarn adds its arguments after the test files, where
# node would take a reporter option for one more file.
set -eu
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
main() {
cd "$ROOT"
NODE_OPTIONS=--test-reporter=dot \
"$ROOT/script/yarn" --silent run test || {
echo "--- Rerunning with every test listed for details ---"
NODE_OPTIONS=--test-reporter=spec \
"$ROOT/script/yarn" --silent run test
exit 1
}
"$ROOT/script/yarn" build
}
main "$@"