From 9866424f04ef4fa50c648074fcb5aa326f530c9d Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 23 Mar 2026 17:46:53 +0100 Subject: [PATCH 1/3] ci: update actions to current versions Signed-off-by: Sebastiaan van Stijn --- .github/workflows/test.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0e1fb6bf..562fc02f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,13 +30,13 @@ jobs: runs-on: ${{ matrix.platform }} steps: - name: Install Go ${{ matrix.go }} - uses: actions/setup-go@v5 + uses: actions/setup-go@v6 with: go-version: ${{ matrix.go }} - name: Setup IPv6 run: sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0 net.ipv6.conf.default.disable_ipv6=0 net.ipv6.conf.all.disable_ipv6=0 - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Build for ${{ matrix.platform }} run: go build ./... - name: Test @@ -53,11 +53,11 @@ jobs: runs-on: ${{ matrix.platform }} steps: - name: Install Go ${{ matrix.go }} - uses: actions/setup-go@v5 + uses: actions/setup-go@v6 with: go-version: ${{ matrix.go }} - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Build for ${{ matrix.platform }} run: go build ./... - name: Test @@ -72,12 +72,12 @@ jobs: platform: [ubuntu-24.04, windows-latest, macos-latest] runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 + - uses: actions/checkout@v6 + - uses: actions/setup-go@v6 with: go-version: "stable" cache: false - name: golangci-lint - uses: golangci/golangci-lint-action@v7 + uses: golangci/golangci-lint-action@v9 with: args: --timeout=5m From 42f44a3e4df01c35363b9ce09eef305e43009a39 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 23 Mar 2026 17:51:08 +0100 Subject: [PATCH 2/3] ci: test against "go.mod", "oldstable", "stable" Signed-off-by: Sebastiaan van Stijn --- .github/workflows/test.yml | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 562fc02f..f380650c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,51 +13,57 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true -on: - push: - pull_request: +on: [push, pull_request] jobs: linux: - name: Test ${{ matrix.platform }} (${{ matrix.go }}) + name: ${{ matrix.platform }} (${{ matrix.go-version || 'oldest' }}) timeout-minutes: 10 strategy: fail-fast: false matrix: - go: ["1.18.x", "oldstable", "stable"] + go-version: + - "" # do not specify go-version to fall back on go-version-file (use go.mod); see https://github.com/actions/setup-go/issues/450#issuecomment-3620402646 + - "oldstable" + - "stable" platform: [ubuntu-24.04] runs-on: ${{ matrix.platform }} steps: - - name: Install Go ${{ matrix.go }} - uses: actions/setup-go@v6 - with: - go-version: ${{ matrix.go }} - name: Setup IPv6 run: sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0 net.ipv6.conf.default.disable_ipv6=0 net.ipv6.conf.all.disable_ipv6=0 - name: Checkout code uses: actions/checkout@v6 + - name: Install Go ${{ matrix.go-version }} + uses: actions/setup-go@v6 + with: + go-version: ${{ matrix.go-version }} + go-version-file: "go.mod" # used when go-version is not specified. - name: Build for ${{ matrix.platform }} run: go build ./... - name: Test run: go test -exec sudo -v ./... other: - name: Test ${{ matrix.platform }} (${{ matrix.go }}) + name: ${{ matrix.platform }} (${{ matrix.go-version || 'oldest' }}) timeout-minutes: 10 strategy: fail-fast: false matrix: - go: ["1.18.x", "oldstable", "stable"] + go-version: + - "" # do not specify go-version to fall back on go-version-file (use go.mod); see https://github.com/actions/setup-go/issues/450#issuecomment-3620402646 + - "oldstable" + - "stable" platform: [windows-latest, macos-latest] runs-on: ${{ matrix.platform }} steps: - - name: Install Go ${{ matrix.go }} - uses: actions/setup-go@v6 - with: - go-version: ${{ matrix.go }} - name: Checkout code uses: actions/checkout@v6 + - name: Install Go ${{ matrix.go-version }} + uses: actions/setup-go@v6 + with: + go-version: ${{ matrix.go-version }} + go-version-file: "go.mod" # used when go-version is not specified. - name: Build for ${{ matrix.platform }} run: go build ./... - name: Test @@ -80,4 +86,4 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v9 with: - args: --timeout=5m + args: --timeout=5m --verbose From ed4e411558e0af9c6cef0f148cf769c085e47093 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 23 Mar 2026 18:01:49 +0100 Subject: [PATCH 3/3] ci: combine lint and linux, non-linux in a single matrix Make sure we lint on all Go versions to prevent fixing linting issues that don't apply to old versions and combine the matrixes. Signed-off-by: Sebastiaan van Stijn --- .github/workflows/test.yml | 69 +++++++++++--------------------------- 1 file changed, 20 insertions(+), 49 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f380650c..385e49ca 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,8 +16,7 @@ concurrency: on: [push, pull_request] jobs: - - linux: + ci: name: ${{ matrix.platform }} (${{ matrix.go-version || 'oldest' }}) timeout-minutes: 10 strategy: @@ -27,36 +26,23 @@ jobs: - "" # do not specify go-version to fall back on go-version-file (use go.mod); see https://github.com/actions/setup-go/issues/450#issuecomment-3620402646 - "oldstable" - "stable" - platform: [ubuntu-24.04] - runs-on: ${{ matrix.platform }} - steps: - - name: Setup IPv6 - run: sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0 net.ipv6.conf.default.disable_ipv6=0 net.ipv6.conf.all.disable_ipv6=0 - - name: Checkout code - uses: actions/checkout@v6 - - name: Install Go ${{ matrix.go-version }} - uses: actions/setup-go@v6 - with: - go-version: ${{ matrix.go-version }} - go-version-file: "go.mod" # used when go-version is not specified. - - name: Build for ${{ matrix.platform }} - run: go build ./... - - name: Test - run: go test -exec sudo -v ./... + platform: [ubuntu-24.04, windows-latest, macos-latest] + include: + - platform: ubuntu-24.04 + test-cmd: go test -exec sudo -v ./... + ipv6: true + - platform: windows-latest + test-cmd: go test -v ./... + ipv6: false + - platform: macos-latest + test-cmd: go test -v ./... + ipv6: false - other: - name: ${{ matrix.platform }} (${{ matrix.go-version || 'oldest' }}) - timeout-minutes: 10 - strategy: - fail-fast: false - matrix: - go-version: - - "" # do not specify go-version to fall back on go-version-file (use go.mod); see https://github.com/actions/setup-go/issues/450#issuecomment-3620402646 - - "oldstable" - - "stable" - platform: [windows-latest, macos-latest] runs-on: ${{ matrix.platform }} steps: + - name: Setup IPv6 + if: matrix.ipv6 + run: sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0 net.ipv6.conf.default.disable_ipv6=0 net.ipv6.conf.all.disable_ipv6=0 - name: Checkout code uses: actions/checkout@v6 - name: Install Go ${{ matrix.go-version }} @@ -64,26 +50,11 @@ jobs: with: go-version: ${{ matrix.go-version }} go-version-file: "go.mod" # used when go-version is not specified. - - name: Build for ${{ matrix.platform }} - run: go build ./... - - name: Test - run: go test -v ./... - - lint: - name: Lint ${{ matrix.platform }} - timeout-minutes: 10 - strategy: - fail-fast: false - matrix: - platform: [ubuntu-24.04, windows-latest, macos-latest] - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v6 - - uses: actions/setup-go@v6 - with: - go-version: "stable" - cache: false - - name: golangci-lint + - name: Lint uses: golangci/golangci-lint-action@v9 with: args: --timeout=5m --verbose + - name: Build + run: go build ./... + - name: Test + run: ${{ matrix.test-cmd }}