Copies .dockerignore, .gitignore, .prettierignore, check.yml and REPO_POLICIES.md from sneak/prompts at dd4027b. The repo's own entries (dist/, release/, yarn files) are kept after the canonical content. The Dockerfile gets separate lint and test phases. Its last stage depends on both, checks the git describe version and runs make build. script/lint, test, check, cibuild and docker are the canonical models. check-censored moves into the lint phase and test-verify-build into the test phase. fmt and fmt-check fall back to the nvm-installed node. The e2e image builds are uncached. Comments that cited the old test caps now say 60 seconds, and comments that named what runs a script now name the Dockerfile phase or stage. Model: opus-5-5
20 lines
593 B
Bash
Executable File
20 lines
593 B
Bash
Executable File
#!/bin/sh
|
|
# 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
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd -P)"
|
|
ROOT="$(cd "$SCRIPT_DIR/.." && pwd -P)"
|
|
|
|
main() {
|
|
cd "$ROOT"
|
|
docker build --no-cache \
|
|
--target test \
|
|
-t "$("$SCRIPT_DIR/projectname")-test" .
|
|
}
|
|
|
|
main "$@"
|