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 # The linter is invoked directly rather than through `make lint`: that
# target shells out to `docker build -f Dockerfile.lint`, and there is # target shells out to `docker build -f Dockerfile.lint`, and there is
# no docker daemon inside a docker build. # 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 # golangci/golangci-lint:v2.12.2 (Debian-based), 2026-08-10
FROM golangci/golangci-lint:v2.12.2@sha256:5cceeef04e53efe1470638d4b4b4f5ceefd574955ab3941b2d9a68a8c9ad5240 AS lint 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 ./... RUN golangci-lint run --config .golangci.yml ./...
# Build stage # Build stage
# script/cibuild and script/docker name this stage in --no-cache-filter.
# golang 1.25-alpine, 2026-02-28 # golang 1.25-alpine, 2026-02-28
FROM golang@sha256:f6751d823c26342f9506c03797d2527668d095b0a15f1862cddb4d927a7a4ced AS builder 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` — format all code (gofmt -s, goimports)
- `script/fmt-check` — check formatting (read-only) - `script/fmt-check` — check formatting (read-only)
- `script/check` — run test, lint, and fmt-check - `script/check` — run test, lint, and fmt-check
- `script/docker` — build the Docker image tagged via `script/projectname`, with - `script/docker` — build the Docker image tagged via
`--no-cache-filter=lint,builder` so the lint stage and the builder stage, `script/projectname`
which runs the tests, run on every invocation
- `script/cibuild` — CI entrypoint: `docker build` with - `script/cibuild` — CI entrypoint: `docker build` with
`--no-cache-filter=lint,builder`, so the lint stage and the builder stage, `--no-cache-filter=lint,builder`, forcing the lint and test stages to
which runs the tests, run on every invocation, because a cached build lints run on every invocation, because a cached build lints nothing and
nothing and queries no DNS queries no DNS
- `script/precommit` — run by the git pre-commit hook; `go mod tidy` - `script/precommit` — run by the git pre-commit hook; `go mod tidy`
guard, then `script/check` guard, then `script/check`
- `script/install-precommit` — install the git pre-commit hook - `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 # Completed Steps
- 2026-09-28: `script/cibuild` and `script/docker` now pass - 2026-09-21: `script/cibuild` and `script/docker` now pass
`--no-cache-filter=lint,builder` so lint and tests run every build (closes `--no-cache-filter=lint,builder` so lint and tests run every build.
#115).
- 2026-09-28: the server timeout test now drives `Run` and checks the - 2026-09-28: the server timeout test now drives `Run` and checks the
`http.Server` it serves carries the timeouts; corrected the `ReadTimeout` `http.Server` it serves carries the timeouts; corrected the `ReadTimeout`
note in that test (closes #120). 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 # make fmt-check and golangci-lint; its builder stage runs make test
# and make build. # and make build.
# #
# --no-cache-filter=lint,builder runs both stages on every invocation; # --no-cache-filter=lint,builder forces both of those stages to run on
# otherwise an unchanged tree is served from the layer cache and passes # every invocation. Without it an unchanged tree serves them from the
# without linting or querying live DNS. # layer cache, reporting success having linted nothing and queried no
# live DNS. A successful build then implies those stages actually ran.
set -eu set -eu
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)" 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. # script/docker: build the Docker image tagged with the project name.
# The tag comes from script/projectname. # The tag comes from script/projectname.
# #
# --no-cache-filter=lint,builder runs the lint stage and the builder # --no-cache-filter=lint,builder forces the lint stage and the builder
# stage (make test) on every invocation; otherwise an unchanged tree is # stage (make test) to run on every invocation. Without it an unchanged
# served from the layer cache without linting or querying live DNS. # tree serves them from the layer cache, producing an image whose build
# linted nothing and queried no live DNS.
set -eu set -eu
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd -P)" SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd -P)"