Files
netwatch/script/frontend-test
T
clawbot ee7ab101aa
check / check (push) Successful in 4m28s
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 frontend-test stage,
script/frontend-test and script/frontend-viewport-test drop their timeout
wrappers, which failed make check on a busy host. go test's -timeout 90s
stays, as REPO_POLICIES.md requires it.

Model: opus-5-5
2026-11-10 20:13:05 +00: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 "$@"