From e2aabdf776a5ce7f7613594616d0473a95b33770 Mon Sep 17 00:00:00 2001 From: Blake Gentry Date: Sun, 15 Nov 2026 13:43:02 -0600 Subject: [PATCH] upgrade Go toolchain and golangci-lint Lint CI follows stable Go while golangci-lint stays pinned, allowing the compiler's export format to outgrow the linter's decoder and prevent analysis. Select Go 1.27.4 as the development toolchain and upgrade golangci-lint to 2.15.0. Read the same toolchain declaration in both primary CI jobs so their Go versions stay aligned. Preserve Go 1.26 as the module minimum to match River's supported release range. Add a Go 1.26 compatibility job with `GOTOOLCHAIN=local` so automatic toolchain selection cannot hide incompatibilities with that release. Declare read-only repository access for the CI token instead of relying on inherited token permissions. --- .github/workflows/ci.yaml | 29 +++++++++++++++++++++++++++-- go.mod | 2 ++ 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 340eaf5..303f22d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -6,6 +6,9 @@ on: - master pull_request: +permissions: + contents: read + jobs: build_and_test: runs-on: ubuntu-latest @@ -26,10 +29,32 @@ jobs: - name: Test run: make test + go_compatibility: + runs-on: ubuntu-latest + env: + # Verify the oldest supported Go version without a toolchain upgrade. + GOTOOLCHAIN: local + + steps: + - name: Checkout + uses: actions/checkout@v7 + + - name: Setup Go + uses: actions/setup-go@v7 + with: + check-latest: true + go-version: "1.26" + + - name: Display Go version + run: go version + + - name: Test + run: make test + golangci-lint: runs-on: ubuntu-latest env: - GOLANGCI_LINT_VERSION: v2.13.1 + GOLANGCI_LINT_VERSION: v2.15.0 steps: - name: Checkout @@ -39,7 +64,7 @@ jobs: uses: actions/setup-go@v7 with: check-latest: true - go-version: "stable" + go-version-file: "go.mod" - name: Lint uses: golangci/golangci-lint-action@v9 diff --git a/go.mod b/go.mod index 61512bb..d07e002 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,8 @@ module github.com/riverqueue/apiframe go 1.26.0 +toolchain go1.27.4 + require ( github.com/go-playground/validator/v10 v10.30.5 github.com/jackc/pgerrcode v0.0.0-20240316143900-6e2875d9b438