check / check (push) Successful in 2m30s
backend/script/test runs go test -timeout 30s -race -cover and, if that fails, runs it again with -v and fails. The root script/test drops its one 30-second timeout around both halves: from a cold Go build cache, compiling the tests with -race used it all up. Each half keeps its own limit. The race detector needs a C compiler: the Dockerfile builder stage gains gcc and musl-dev, and script/bootstrap installs gcc, with the C library headers on apt and apk, when gcc is missing; make build still sets CGO_ENABLED=0. New tests: the health check's answer, a valid report's answer, a report file's exact lines, and the flush at the 10 MiB threshold. The handlers TestImport stub is gone. Model: opus-5-5
18 lines
501 B
Bash
Executable File
18 lines
501 B
Bash
Executable File
#!/bin/sh
|
|
# script/test: run the test suite for the whole repo: the frontend at
|
|
# the repo root, then the Go backend in backend/. Each half has its own
|
|
# 30-second limit, and there is none around both: from a cold Go build
|
|
# cache, compiling the backend's tests with the race detector can take
|
|
# 30 seconds on its own, and Go's -timeout leaves the compile out.
|
|
set -eu
|
|
|
|
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
|
|
|
|
main() {
|
|
cd "$ROOT"
|
|
script/frontend-test
|
|
backend/script/test
|
|
}
|
|
|
|
main "$@"
|