script: force lint and test to run in cibuild and docker (closes #115)
check / check (push) Successful in 58s
check / check (push) Successful in 58s
script/cibuild and script/docker were plain docker build. On an unchanged tree the lint stage and the builder stage's make test came from the layer cache, so the build reported success having linted nothing and queried no live DNS. Both scripts now pass --no-cache-filter=lint,builder, so those stages run on every build; this mirrors script/lint, which already does the same for the lint stage alone. Dependency downloads inside the disabled stages re-run, which the issue accepts. No pins, .golangci.yml, or test behaviour changed. README and TODO.md updated to match. Model: opus-4-8 (implementation); opus-5-5 (rebase)
This commit is contained in:
+7
-2
@@ -1,14 +1,19 @@
|
||||
#!/bin/sh
|
||||
# script/cibuild: run the CI build. The Dockerfile's lint stage runs
|
||||
# make fmt-check and golangci-lint; its builder stage runs make test
|
||||
# and make build. A successful build implies all of those passed.
|
||||
# and make build.
|
||||
#
|
||||
# --no-cache-filter=lint,builder forces both of those stages to run on
|
||||
# every invocation. Without it an unchanged tree serves them from the
|
||||
# layer cache, reporting success having linted nothing and queried no
|
||||
# live DNS. A successful build then implies those stages actually ran.
|
||||
set -eu
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
|
||||
|
||||
main() {
|
||||
cd "$ROOT"
|
||||
docker build .
|
||||
docker build --no-cache-filter=lint,builder .
|
||||
}
|
||||
|
||||
main "$@"
|
||||
|
||||
+7
-2
@@ -1,6 +1,11 @@
|
||||
#!/bin/sh
|
||||
# script/docker: build the Docker image tagged with the project name.
|
||||
# Identical in all repos; the tag comes from script/projectname.
|
||||
# The tag comes from script/projectname.
|
||||
#
|
||||
# --no-cache-filter=lint,builder forces the lint stage and the builder
|
||||
# stage (make test) to run on every invocation. Without it an unchanged
|
||||
# tree serves them from the layer cache, producing an image whose build
|
||||
# linted nothing and queried no live DNS.
|
||||
set -eu
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd -P)"
|
||||
@@ -8,7 +13,7 @@ ROOT="$(cd "$SCRIPT_DIR/.." && pwd -P)"
|
||||
|
||||
main() {
|
||||
cd "$ROOT"
|
||||
docker build -t "$("$SCRIPT_DIR/projectname")" .
|
||||
docker build --no-cache-filter=lint,builder -t "$("$SCRIPT_DIR/projectname")" .
|
||||
}
|
||||
|
||||
main "$@"
|
||||
|
||||
Reference in New Issue
Block a user