Skip to content

Commit 656c7ae

Browse files
committed
fix: update GitHub Actions and fix golangci-lint config for v2
- Update actions/upload-artifact from v3 to v4 - Update golangci/golangci-lint-action from v3 to v6 - Fix golangci.yml configuration for golangci-lint v2.x - Move gofmt and goimports to formatters section
1 parent a819af5 commit 656c7ae

2 files changed

Lines changed: 23 additions & 30 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
run: go mod tidy
3535

3636
- name: Run golangci-lint
37-
uses: golangci/golangci-lint-action@v3
37+
uses: golangci/golangci-lint-action@v6
3838
with:
3939
version: ${{ env.GOLANGCI_LINT_VERSION }}
4040

@@ -73,7 +73,7 @@ jobs:
7373
gotestsum --junitfile junit.xml --format testname -- -v -cover -coverprofile=coverage.out ./internal/...
7474
7575
- name: Upload test results
76-
uses: actions/upload-artifact@v3
76+
uses: actions/upload-artifact@v4
7777
if: always()
7878
with:
7979
name: test-results
@@ -130,7 +130,7 @@ jobs:
130130
go build -o "$output" -ldflags "-X main.version=${{ github.ref_name }}" .
131131
132132
- name: Upload artifacts
133-
uses: actions/upload-artifact@v3
133+
uses: actions/upload-artifact@v4
134134
with:
135135
name: terraform-provider-pocketid_${{ matrix.os }}_${{ matrix.arch }}
136136
path: terraform-provider-pocketid*

.golangci.yml

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,36 @@
11
version: "2"
2+
23
run:
4+
timeout: 5m
5+
tests: true
36
build-tags:
47
- acc
5-
tests: true
8+
69
linters:
7-
default: none
10+
disable-all: true
811
enable:
912
- errcheck
1013
- govet
1114
- ineffassign
1215
- misspell
1316
- staticcheck
1417
- unused
15-
exclusions:
16-
generated: lax
17-
rules:
18-
- linters:
19-
- errcheck
20-
path: _test\.go
21-
paths:
22-
- third_party$
23-
- builtin$
24-
- examples$
25-
issues:
26-
max-issues-per-linter: 0
27-
max-same-issues: 0
18+
2819
formatters:
2920
enable:
3021
- gofmt
3122
- goimports
32-
settings:
33-
gofmt:
34-
simplify: true
35-
goimports:
36-
local-prefixes:
37-
- github.com/Trozz/terraform-provider-pocketid
38-
exclusions:
39-
generated: lax
40-
paths:
41-
- third_party$
42-
- builtin$
43-
- examples$
23+
24+
linters-settings:
25+
gofmt:
26+
simplify: true
27+
goimports:
28+
local-prefixes: github.com/Trozz/terraform-provider-pocketid
29+
30+
issues:
31+
max-issues-per-linter: 0
32+
max-same-issues: 0
33+
exclude-rules:
34+
- path: _test\.go
35+
linters:
36+
- errcheck

0 commit comments

Comments
 (0)