Skip to content

Commit 66ff8ee

Browse files
dipto0321claude
andcommitted
fix(ci): use go-version-file and upgrade golangci-lint to fix typecheck
The lint job pinned Go 1.22 while go.mod requires 1.26.4, causing golangci-lint to fail type-checking with "undefined: semver". Switch all jobs to go-version-file so CI always matches the module's toolchain. Upgrade golangci-lint-action v4→v6 and pin version to latest to support Go 1.26. Also replace deprecated skip-dirs with exclude-dirs in .golangci.yml. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 09d1319 commit 66ff8ee

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ jobs:
4646
- name: Setup Go
4747
uses: actions/setup-go@v5
4848
with:
49-
go-version: '1.22'
49+
go-version-file: 'go.mod'
5050
cache: true
5151

5252
- name: golangci-lint
53-
uses: golangci/golangci-lint-action@v4
53+
uses: golangci/golangci-lint-action@v6
5454
with:
55-
version: v1.55.2
55+
version: latest
5656
args: --timeout=5m
5757

5858
- name: commitlint
@@ -71,15 +71,14 @@ jobs:
7171
fail-fast: false
7272
matrix:
7373
os: [ubuntu-latest, macos-latest, windows-latest]
74-
go: ['1.22']
7574
steps:
7675
- name: Checkout
7776
uses: actions/checkout@v4
7877

7978
- name: Setup Go
8079
uses: actions/setup-go@v5
8180
with:
82-
go-version: ${{ matrix.go }}
81+
go-version-file: 'go.mod'
8382
cache: true
8483

8584
- name: Run tests
@@ -120,7 +119,7 @@ jobs:
120119
- name: Setup Go
121120
uses: actions/setup-go@v5
122121
with:
123-
go-version: '1.22'
122+
go-version-file: 'go.mod'
124123
cache: true
125124

126125
- name: Build

‎.golangci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ run:
2424
timeout: 5m
2525
tests: true
2626
# Skip the auto-generated docs/ and .puku/ folders.
27-
skip-dirs:
27+
exclude-dirs:
2828
- docs
2929
- dist
3030
- vendor

0 commit comments

Comments
 (0)