Commit Graph

5 Commits

Author SHA1 Message Date
clawbot
528ed5bd74 rework: multi-stage Dockerfile lint/build/runtime pattern
All checks were successful
check / check (pull_request) Successful in 5m22s
Rewrites CI to use a multi-stage Dockerfile per REPO_POLICIES:

- Lint stage: golangci/golangci-lint:v2.1.6-alpine runs make fmt-check
  and make lint
- Build stage: golang:1.24.4-alpine runs make test, then builds binary
  with CGO enabled (required for mattn/go-sqlite3)
- Runtime stage: alpine:3.21 copies binary, runs as non-root user

All base images pinned by @sha256 hash.

CI workflow simplified to just 'docker build .' since the Dockerfile
already runs make check (fmt-check + lint + test).

Makefile aligned with REPO_POLICIES:
- check target uses prereqs (fmt-check lint test)
- fmt-check is read-only (gofmt -l, not go fmt)
- Added docker and hooks targets
- test uses -race -timeout 30s

Added .dockerignore for efficient build context.
2026-03-17 01:58:41 -07:00
clawbot
0355dedab7 fix CI: use pre-built golangci-lint binary and install sqlite3
All checks were successful
check / check (pull_request) Successful in 11m57s
Two issues caused CI failures:

1. golangci-lint v2.10.1 requires Go >= 1.25.0, but the project uses
   Go 1.24.4 (from go.mod). The previous `go install` approach tried
   to compile golangci-lint from source, which fails due to the Go
   version mismatch. Fix: download the pre-built binary via the
   official install script, pinned to the same commit SHA (5d1e709)
   for security.

2. TestBackupAndRestore fails because vacuumDatabase() shells out to
   the `sqlite3` CLI binary, which is not installed in the CI runner
   image. Fix: install sqlite3 via apt-get in CI.
2026-03-10 12:14:44 -07:00
4a7efbae46 security: pin all go install refs to commit SHAs
Some checks failed
check / check (pull_request) Failing after 7m24s
2026-02-20 03:10:52 -08:00
user
28371476bc security: pin CI actions to commit SHAs
Some checks failed
check / check (pull_request) Failing after 6m6s
2026-02-20 02:58:35 -08:00
user
c65170b8df add CI workflow for make check
Some checks failed
check / check (pull_request) Failing after 6m24s
2026-02-20 02:53:14 -08:00