Add make check target and CI workflow #36

Merged
sneak merged 1 commits from add-make-check into next 2026-03-02 11:04:47 +01:00
Collaborator

Adds a make check target that verifies formatting (gofmt), linting (golangci-lint), and tests (go test -race) without modifying files.

Also adds .gitea/workflows/check.yml CI workflow that runs on pushes and PRs to main and next.

make check passes cleanly on current next branch.

Adds a `make check` target that verifies formatting (gofmt), linting (golangci-lint), and tests (go test -race) without modifying files. Also adds `.gitea/workflows/check.yml` CI workflow that runs on pushes and PRs to main and next. `make check` passes cleanly on current next branch.
clawbot added the
merge-ready
label 2026-02-20 11:54:22 +01:00
sneak was assigned by clawbot 2026-02-20 11:54:22 +01:00
clawbot added 2 commits 2026-02-20 11:54:22 +01:00
Author
Collaborator

Pinned CI action references to commit SHAs for security (tags are mutable and an RCE vector):

  • actions/checkout@v4actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
  • actions/setup-go@v5actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff
Pinned CI action references to commit SHAs for security (tags are mutable and an RCE vector): - `actions/checkout@v4` → `actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5` - `actions/setup-go@v5` → `actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff`
clawbot added 1 commit 2026-02-20 11:58:29 +01:00
clawbot added 1 commit 2026-02-20 12:11:02 +01:00
sneak added 1 commit 2026-02-20 12:15:29 +01:00
Owner

“make check” should have check-fmt and lint and test as prereqs and each should be its own makefile target.

“make check” should have check-fmt and lint and test as prereqs and each should be its own makefile target.
clawbot force-pushed add-make-check from 5609365e07 to ae0e96eba3 2026-02-20 12:17:41 +01:00 Compare
Author
Collaborator

Restructured Makefile per review feedback:

  • make check-fmt — format checking (gofmt)
  • make lint — golangci-lint
  • make test — runs tests
  • make check — depends on check-fmt, lint, test (runs all three)

All checks pass:

==> Checking formatting...
==> Running linter...
==> Running tests...
PASS ok sneak.berlin/go/mfer/mfer 8.619s
Restructured Makefile per review feedback: - `make check-fmt` — format checking (gofmt) - `make lint` — golangci-lint - `make test` — runs tests - `make check` — depends on check-fmt, lint, test (runs all three) All checks pass: ``` ==> Checking formatting... ==> Running linter... ==> Running tests... PASS ok sneak.berlin/go/mfer/mfer 8.619s ```
Owner

the Dockerfile should run "make check" early in its build process, and the CI action should simply ensure that "docker build ." works (which implicitly runs "make check").

the Dockerfile should run "make check" early in its build process, and the CI action should simply ensure that "docker build ." works (which implicitly runs "make check").
sneak removed their assignment 2026-02-28 19:23:32 +01:00
clawbot was assigned by sneak 2026-02-28 19:23:32 +01:00
clawbot added 1 commit 2026-02-28 19:24:52 +01:00
Per reviewer feedback: the Dockerfile now runs 'make check' early in
its build process (after dependencies are extracted). The CI workflow
is simplified to just run 'docker build .', which implicitly runs
'make check' as part of the Docker build.
Author
Collaborator

Reworked per feedback:

  1. Dockerfile: Added RUN make check early in the build (after modcache extraction, before the main build step)
  2. CI workflow: Simplified to just docker build . — since the Dockerfile now runs make check, CI only needs to verify the Docker build succeeds
  3. Makefile: Unchanged (check-fmt, lint, test, check targets as-is)

make check passes locally. Ready for re-review.

Reworked per feedback: 1. **Dockerfile**: Added `RUN make check` early in the build (after modcache extraction, before the main build step) 2. **CI workflow**: Simplified to just `docker build .` — since the Dockerfile now runs `make check`, CI only needs to verify the Docker build succeeds 3. **Makefile**: Unchanged (check-fmt, lint, test, check targets as-is) `make check` passes locally. Ready for re-review.
clawbot removed their assignment 2026-02-28 19:25:02 +01:00
sneak was assigned by clawbot 2026-02-28 19:25:02 +01:00
sneak added 1 commit 2026-03-01 23:58:58 +01:00
Owner

rework this PR following the new method here:

clawbot/sdlc-manager#6

rework this PR following the new method here: https://git.eeqj.de/clawbot/sdlc-manager/issues/6
sneak added
bot
and removed
merge-ready
labels 2026-03-01 23:59:31 +01:00
sneak removed their assignment 2026-03-01 23:59:36 +01:00
Owner

@clawbot aee above

@clawbot aee above
clawbot force-pushed add-make-check from 6aed479650 to ffc400a140 2026-03-02 11:00:56 +01:00 Compare
clawbot added the
needs-review
label 2026-03-02 11:01:15 +01:00
Author
Collaborator

Reworked per feedback to use the Dockerfile split approach from clawbot/sdlc-manager#6:

Dockerfile changes

  • Lint stage: Uses prebuilt golangci/golangci-lint:v1.64.8 image (sha256-pinned) for fast feedback — runs make fmt-check and make lint
  • Build stage: Uses golang:1.24-alpine (sha256-pinned) for tests and compilation — runs make test and make build
  • Build stage includes COPY --from=lint /src/go.sum /dev/null to force BuildKit to run the lint stage
  • Replaced sneak/builder:2022-12-08 (Go 1.19) since the project now requires Go 1.23
  • Removed vendor.tzst/modcache.tzst references (removed in prior commit); uses go mod download instead
  • Preserves source archive in final scratch image for posterity

Makefile changes

  • Added fmt-check target (checks gofmt formatting without modifying files)
  • Added build target (builds binary without requiring protoc for CI)
  • Added check target with prereqs: fmt-check, lint, test
  • Added hooks target (installs pre-commit hook running make check)
  • Removed mfer/mf.pb.go prerequisite from lint and test targets (the generated file is committed; avoids needing protoc in CI images)

CI workflow

  • Simple docker build . on push/PR to main/next — implicitly runs all checks via Dockerfile stages
  • actions/checkout pinned to commit SHA

README

  • Updated Go version requirement to 1.23
  • Documented new targets: make build, make fmt-check, make check, make hooks

docker build . passes cleanly — all tests pass, lint passes, format check passes.

Rebased onto next and squashed into a single commit.

Reworked per feedback to use the Dockerfile split approach from [clawbot/sdlc-manager#6](https://git.eeqj.de/clawbot/sdlc-manager/issues/6): ### Dockerfile changes - **Lint stage**: Uses prebuilt `golangci/golangci-lint:v1.64.8` image (sha256-pinned) for fast feedback — runs `make fmt-check` and `make lint` - **Build stage**: Uses `golang:1.24-alpine` (sha256-pinned) for tests and compilation — runs `make test` and `make build` - Build stage includes `COPY --from=lint /src/go.sum /dev/null` to force BuildKit to run the lint stage - Replaced `sneak/builder:2022-12-08` (Go 1.19) since the project now requires Go 1.23 - Removed vendor.tzst/modcache.tzst references (removed in prior commit); uses `go mod download` instead - Preserves source archive in final scratch image for posterity ### Makefile changes - Added `fmt-check` target (checks `gofmt` formatting without modifying files) - Added `build` target (builds binary without requiring `protoc` for CI) - Added `check` target with prereqs: `fmt-check`, `lint`, `test` - Added `hooks` target (installs pre-commit hook running `make check`) - Removed `mfer/mf.pb.go` prerequisite from `lint` and `test` targets (the generated file is committed; avoids needing `protoc` in CI images) ### CI workflow - Simple `docker build .` on push/PR to main/next — implicitly runs all checks via Dockerfile stages - `actions/checkout` pinned to commit SHA ### README - Updated Go version requirement to 1.23 - Documented new targets: `make build`, `make fmt-check`, `make check`, `make hooks` `docker build .` passes cleanly — all tests pass, lint passes, format check passes. Rebased onto `next` and squashed into a single commit. <!-- session: agent:sdlc-manager:subagent:bcea7f64-47b6-47b7-80ae-c49c43de1852 -->
sneak merged commit acbdf3a376 into next 2026-03-02 11:04:47 +01:00
sneak deleted branch add-make-check 2026-03-02 11:04:47 +01:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sneak/mfer#36
No description provided.