From 7f3a75e18ab430f47dac6f75cfdc66135c3b6e43 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 21 Aug 2026 13:26:49 +0200 Subject: [PATCH] ci: test against oldest supported, oldstable, and stable Go versions Add a matrix to run tests against the oldest supported version (as specified in go.mod), as well as current and previous stable Go. Use a custom name for the job so that the names are stable, which helps when configuring GitHub branch policies. Signed-off-by: Sebastiaan van Stijn --- .github/workflows/golangci-lint.yml | 2 +- .github/workflows/sanity.yml | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index db989a2a..eead4f5d 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -24,7 +24,7 @@ jobs: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: - go-version: '1.24.x' + go-version: stable - name: golangci-lint uses: golangci/golangci-lint-action@82606bf257cbaff209d206a39f5134f0cfbfd2ee # v9.2.1 with: diff --git a/.github/workflows/sanity.yml b/.github/workflows/sanity.yml index e8e2d18c..35a789c4 100644 --- a/.github/workflows/sanity.yml +++ b/.github/workflows/sanity.yml @@ -38,13 +38,21 @@ jobs: make mod-tidy && git diff --exit-code test: - name: "Run tests" + name: "Run tests / Go ${{ matrix.go-version || 'minimum' }}" runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + go-version: + - "" # leave empty to use go-version-file (use go.mod) + - oldstable + - stable steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: - go-version: ${{ env.GO_VERSION }} + go-version: ${{ matrix.go-version }} + go-version-file: go.mod # used when go-version is empty - name: Test run: make test