Run make check inside the Docker build with a pinned lint stage (closes #5) #7

Merged
clawbot merged 1 commits from issue-5-dockerfile-make-check into next 2026-09-21 09:35:17 +02:00
Collaborator

Closes #5

The container build now runs the repo's checks, so the build fails when the branch is not green. Change is Dockerfile only.

  • New lint stage on golangci/golangci-lint:v2.7.2 (Go 1.25.5), pinned by digest, runs make fmt-check and make lint. That image already carries Go, gcc and make, so go vet on the CGO sqlite package and golangci-lint run with no extra installs.
  • The build stage runs make test and waits for the lint stage via COPY --from=lint /src/go.sum /dev/null. Tests run with -race (cgo; gcc is already installed) and stay offline because the live-feed test is opt-in as of #4 — this unit depends on that PR being on next.
  • golang:1.24-bookworm and debian:bookworm-slim are pinned by digest with version and date comments; versions are unchanged.

The final image content and entrypoint are unchanged.

The newly running linter surfaced no problems in existing code, so this PR contains no lint fixes and .golangci.yml is untouched.

Judgement call: TODO.md is left untouched — its steps track milestones, not this unit, and the issue limits scope to the Dockerfile.

Model: opus-4-8

Closes https://git.eeqj.de/sneak/routewatch/issues/5 The container build now runs the repo's checks, so the build fails when the branch is not green. Change is Dockerfile only. - New lint stage on golangci/golangci-lint:v2.7.2 (Go 1.25.5), pinned by digest, runs make fmt-check and make lint. That image already carries Go, gcc and make, so go vet on the CGO sqlite package and golangci-lint run with no extra installs. - The build stage runs make test and waits for the lint stage via COPY --from=lint /src/go.sum /dev/null. Tests run with -race (cgo; gcc is already installed) and stay offline because the live-feed test is opt-in as of https://git.eeqj.de/sneak/routewatch/pulls/4 — this unit depends on that PR being on next. - golang:1.24-bookworm and debian:bookworm-slim are pinned by digest with version and date comments; versions are unchanged. The final image content and entrypoint are unchanged. The newly running linter surfaced no problems in existing code, so this PR contains no lint fixes and .golangci.yml is untouched. Judgement call: TODO.md is left untouched — its steps track milestones, not this unit, and the issue limits scope to the Dockerfile. Model: opus-4-8
clawbot added the needs-review label 2026-09-21 09:15:18 +02:00
clawbot self-assigned this 2026-09-21 09:15:18 +02:00
clawbot added 1 commit 2026-09-21 09:15:18 +02:00
Adds a golangci-lint lint stage that runs make fmt-check and make lint,
and runs make test in the build stage, so the container build fails when
formatting, lint, or any test fails. The build stage waits for the lint
stage via COPY --from=lint /src/go.sum /dev/null.

Pins the base images by digest (golang:1.24-bookworm, debian:bookworm-slim)
and the new lint image (golangci/golangci-lint:v2.7.2, Go 1.25.5) with
version and date comments; versions are unchanged. The final image content
and entrypoint are unchanged.

Model: opus-4-8
Author
Collaborator

Reviewed against the current next (rebased): the change meets the issue's definition of done and the Dockerfile policy — a pinned lint stage runs make fmt-check and make lint, the build stage waits on it and runs the offline -short tests, all three base images are pinned to digests that match their named tags with unchanged versions, the final image content and start-up are untouched, and the build passes clean while failing when the format check, the linter, or a test fails.

Model: opus-4-8

Reviewed against the current `next` (rebased): the change meets the issue's definition of done and the Dockerfile policy — a pinned lint stage runs `make fmt-check` and `make lint`, the build stage waits on it and runs the offline `-short` tests, all three base images are pinned to digests that match their named tags with unchanged versions, the final image content and start-up are untouched, and the build passes clean while failing when the format check, the linter, or a test fails. Model: opus-4-8
clawbot merged commit 54014c88c8 into next 2026-09-21 09:35:17 +02:00
clawbot deleted branch issue-5-dockerfile-make-check 2026-09-21 09:35:17 +02:00
clawbot removed the needs-review label 2026-09-21 09:35:17 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/routewatch#7