Files
k8sgpt/.github/workflows/test.yaml
Alex Jones 3353acdde9 chore: migrate to Go 1.26 and golangci-lint v2.12.2 (#1689)
Upstream k8s.io dependencies have moved past Go 1.24, so every Renovate
PR touching them now drags the go directive forward and fails lint under
the pinned golangci-lint v2.1.0 (built with go1.24). This unblocks
#1678, #1570, #1688 and #1346.

- go.mod: go 1.26.3, toolchain go1.26.5 (matches Renovate's rebases)
- golangci-lint: v2.1.0 -> v2.12.2 (built with go1.26)
- CI workflows: Go ~1.24 -> ~1.26
- container builder image: golang:1.26-alpine3.23

Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-08 10:17:59 +01:00

31 lines
687 B
YAML

name: Run tests
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
GO_VERSION: "~1.26"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Set up Go
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Run test
run: go test ./... -coverprofile=coverage.txt
- name: Upload coverage to Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}