1 Commits
Author SHA1 Message Date
sneak 34c195f65b script: force lint and test to run in cibuild and docker (closes #115)
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)
2026-09-28 20:02:26 +00:00
5 changed files with 15 additions and 17 deletions
-2
View File
@@ -2,7 +2,6 @@
# The linter is invoked directly rather than through `make lint`: that
# target shells out to `docker build -f Dockerfile.lint`, and there is
# no docker daemon inside a docker build.
# script/cibuild and script/docker name this stage in --no-cache-filter.
# golangci/golangci-lint:v2.12.2 (Debian-based), 2026-08-10
FROM golangci/golangci-lint:v2.12.2@sha256:5cceeef04e53efe1470638d4b4b4f5ceefd574955ab3941b2d9a68a8c9ad5240 AS lint
@@ -16,7 +15,6 @@ RUN make fmt-check
RUN golangci-lint run --config .golangci.yml ./...
# Build stage
# script/cibuild and script/docker name this stage in --no-cache-filter.
# golang 1.25-alpine, 2026-02-28
FROM golang@sha256:f6751d823c26342f9506c03797d2527668d095b0a15f1862cddb4d927a7a4ced AS builder
+5 -6
View File
@@ -465,13 +465,12 @@ them. We provide:
- `script/fmt` — format all code (gofmt -s, goimports)
- `script/fmt-check` — check formatting (read-only)
- `script/check` — run test, lint, and fmt-check
- `script/docker` — build the Docker image tagged via `script/projectname`, with
`--no-cache-filter=lint,builder` so the lint stage and the builder stage,
which runs the tests, run on every invocation
- `script/docker` — build the Docker image tagged via
`script/projectname`
- `script/cibuild` — CI entrypoint: `docker build` with
`--no-cache-filter=lint,builder`, so the lint stage and the builder stage,
which runs the tests, run on every invocation, because a cached build lints
nothing and queries no DNS
`--no-cache-filter=lint,builder`, forcing the lint and test stages to
run on every invocation, because a cached build lints nothing and
queries no DNS
- `script/precommit` — run by the git pre-commit hook; `go mod tidy`
guard, then `script/check`
- `script/install-precommit` — install the git pre-commit hook
+2 -3
View File
@@ -23,9 +23,8 @@ Rationale, Design, TODO, License, Author) if any are still missing.
# Completed Steps
- 2026-09-28: `script/cibuild` and `script/docker` now pass
`--no-cache-filter=lint,builder` so lint and tests run every build (closes
#115).
- 2026-09-21: `script/cibuild` and `script/docker` now pass
`--no-cache-filter=lint,builder` so lint and tests run every build.
- 2026-09-28: the server timeout test now drives `Run` and checks the
`http.Server` it serves carries the timeouts; corrected the `ReadTimeout`
note in that test (closes #120).
+4 -3
View File
@@ -3,9 +3,10 @@
# make fmt-check and golangci-lint; its builder stage runs make test
# and make build.
#
# --no-cache-filter=lint,builder runs both stages on every invocation;
# otherwise an unchanged tree is served from the layer cache and passes
# without linting or querying live DNS.
# --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)"
+4 -3
View File
@@ -2,9 +2,10 @@
# script/docker: build the Docker image tagged with the project name.
# The tag comes from script/projectname.
#
# --no-cache-filter=lint,builder runs the lint stage and the builder
# stage (make test) on every invocation; otherwise an unchanged tree is
# served from the layer cache without linting or querying live DNS.
# --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)"