Re-vendor the canonical files from sneak/prompts at dd4027b (closes #121)
check / check (push) Waiting to run
check / check (push) Waiting to run
The vendored files are copies from sneak/prompts dd4027b, with this repository's own entries after the canonical content. golangci-lint is v2.14.0. Lint and test are phases of the Dockerfile, which script/lint and script/test build with --no-cache; Dockerfile.lint and script/lint-darwin are gone, and the lint phase also checks the macOS build. The tests run on the Debian Go image with cgo and the race detector. script/cibuild bootstraps, runs script/check and builds the image; CHECK_EPOCH and the memlock ulimit are gone. Go's build cache stays in a cache mount, out of the test image's layer. Agent guidance lives in AGENTS.md alone; the tool-specific file is gone. Model: opus-5-5
This commit was merged in pull request #128.
This commit is contained in:
+10
-13
@@ -1,22 +1,19 @@
|
||||
#!/bin/sh
|
||||
# script/test: run the test suite (vet first, then the tests with the race
|
||||
# detector; a verbose rerun on failure).
|
||||
# script/test: run the test suite. Testing is a phase of the Dockerfile
|
||||
# and this builds that phase alone, on the same terms as script/lint:
|
||||
# --target because a phase that is not the last stage is built only when
|
||||
# named, --no-cache because a cached test layer is a test that did not
|
||||
# run, and a tag so each build replaces the previous image.
|
||||
set -eu
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd -P)"
|
||||
ROOT="$(cd "$SCRIPT_DIR/.." && pwd -P)"
|
||||
|
||||
main() {
|
||||
cd "$ROOT"
|
||||
# CGO is required (Makefile exports this too)
|
||||
export CGO_ENABLED=1
|
||||
go vet ./...
|
||||
# -count=1: run every test, never take a result from Go's test cache,
|
||||
# which the Dockerfile keeps between builds. The rerun only prints
|
||||
# details: `exit 1` keeps the script failing even if a flaky test
|
||||
# passes on the second attempt.
|
||||
go test -count=1 -timeout 30s -race -cover ./... || \
|
||||
{ echo "--- Rerunning with -v for details ---"; \
|
||||
go test -count=1 -timeout 30s -race -v ./...; exit 1; }
|
||||
docker build --no-cache \
|
||||
--target test \
|
||||
-t "$("$SCRIPT_DIR/projectname")-test" .
|
||||
}
|
||||
|
||||
main "$@"
|
||||
|
||||
Reference in New Issue
Block a user