Re-vendor the shared files from sneak/prompts at dd4027b (closes #113)
check / check (push) Canceled after 0s
check / check (push) Canceled after 0s
The shared files are the sneak/prompts copies at dd4027b, with this repository's own entries after them. make lint and make test each build one Dockerfile phase without the cache, both covering the frontend through a node stage; the builder stage waits on both and takes its version from git describe unless VERSION is given. golangci-lint moves to v2.14.0 with the new .golangci.yml; one test spells X-Request-ID as canonicalheader asks. prettier formats only JavaScript, CSS, HTML and Markdown, so .golangci.yml stays as fetched. script/fmt and script/fmt-check put ~/.local/bin on PATH, which the shared workflow no longer does. script/bootstrap keeps a Go only if it is exactly GO_VERSION, and re-checks the go on PATH after installing. Model: opus-5-5
This commit is contained in:
+10
-7
@@ -1,18 +1,21 @@
|
||||
#!/bin/sh
|
||||
# script/test: run the backend test suite with the race detector and
|
||||
# coverage. Go's own -timeout bounds the tests and not their compile,
|
||||
# so a cold build cache cannot fail it. The race detector needs cgo,
|
||||
# and so a C compiler. If the tests fail, they run again with -v for
|
||||
# the details, and the script fails even if that run passes.
|
||||
# script/test: run the backend test suite on the host with the race
|
||||
# detector and coverage. The root make test runs the same in the test
|
||||
# phase of the root Dockerfile. Go's own -timeout bounds the tests and
|
||||
# not their compile, so a cold build cache cannot fail it. -count=1
|
||||
# keeps Go's test result cache out of both runs, so neither can report
|
||||
# a stored pass. The race detector needs cgo, and so a C compiler. If
|
||||
# the tests fail, they run again with -v for the details, and the
|
||||
# script fails even if that run passes.
|
||||
set -eu
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
|
||||
|
||||
main() {
|
||||
cd "$ROOT"
|
||||
go test -timeout 30s -race -cover ./... || {
|
||||
go test -count=1 -timeout 90s -race -cover ./... || {
|
||||
echo "--- Rerunning with -v for details ---"
|
||||
go test -timeout 30s -race -v ./...
|
||||
go test -count=1 -timeout 90s -race -v ./...
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user