Build and test with a supported Go release (closes #107)
check / check (push) Canceled after 0s
check / check (push) Canceled after 0s
The test and build stages move from golang:1.24-bookworm, a release line that no longer gets security fixes, to golang:1.27.2-bookworm, pinned by digest. The go directive in go.mod moves from 1.24.4 to 1.27.1, the Go in the pinned lint image, so no stage downloads another toolchain. One test starts its goroutine with sync.WaitGroup.Go, which the linter asks for once the module targets Go 1.25 or later. Model: opus-5-5
This commit was merged in pull request #125.
This commit is contained in:
+4
-4
@@ -24,8 +24,8 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
|
||||
# image ships and the alpine one does not. -count=1 because the mounted
|
||||
# cache also holds test results, which go test would otherwise replay.
|
||||
# -short skips the live RIS Live feed test, so the suite needs no network.
|
||||
# golang:1.24-bookworm, 2026-09-21
|
||||
FROM golang@sha256:1a6d4452c65dea36aac2e2d606b01b4a029ec90cc1ae53890540ce6173ea77ac AS test
|
||||
# golang:1.27.2-bookworm, 2026-10-19
|
||||
FROM golang@sha256:5cf287a799e6b94384bad13d16b14904c531f51ba65792237e122ce42b392f61 AS test
|
||||
WORKDIR /src
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
@@ -39,8 +39,8 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
|
||||
# Build stage. Nothing is wanted from either phase above; the copies
|
||||
# are what make BuildKit build them first, so nothing after them can
|
||||
# run unless lint and test passed.
|
||||
# golang:1.24-bookworm, 2026-09-21
|
||||
FROM golang@sha256:1a6d4452c65dea36aac2e2d606b01b4a029ec90cc1ae53890540ce6173ea77ac AS builder
|
||||
# golang:1.27.2-bookworm, 2026-10-19
|
||||
FROM golang@sha256:5cf287a799e6b94384bad13d16b14904c531f51ba65792237e122ce42b392f61 AS builder
|
||||
|
||||
# Install build dependencies (zstd for archive, gcc for CGO/sqlite3)
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module git.eeqj.de/sneak/routewatch
|
||||
|
||||
go 1.24.4
|
||||
go 1.27.1
|
||||
|
||||
require (
|
||||
github.com/dustin/go-humanize v1.0.1
|
||||
|
||||
@@ -564,11 +564,8 @@ func TestBatchWriteDuringCheckpoint(t *testing.T) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(1)
|
||||
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
|
||||
wg.Go(func() {
|
||||
for {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
@@ -577,7 +574,7 @@ func TestBatchWriteDuringCheckpoint(t *testing.T) {
|
||||
_ = db.Checkpoint(ctx) // errors are the checkpoint's own to absorb
|
||||
}
|
||||
}
|
||||
}()
|
||||
})
|
||||
|
||||
ts := time.Now().UTC()
|
||||
for i := range contentionIterations {
|
||||
|
||||
Reference in New Issue
Block a user