Skip to content

Commit 717e9fa

Browse files
committed
ci: update golangci-lint
1 parent d7b4609 commit 717e9fa

File tree

3 files changed

+50
-10
lines changed

3 files changed

+50
-10
lines changed

.github/workflows/ci.yaml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,12 @@ jobs:
5757
run: |
5858
export COVERDIR=coverages
5959
mkdir "$COVERDIR/"
60-
go test ./environment/deploy/... -run=^Test_U_ -coverprofile "$COVERDIR/environment.out" -json | tee -a gotest.json
61-
go test ./install/deploy/... -run=^Test_U_ -coverprofile "$COVERDIR/install.out" -json | tee -a gotest.json
62-
go test ./webserver/... -run=^Test_U_ -coverprofile "$COVERDIR/webserver.out" -json | tee -a gotest.json
63-
go tool covdata textfmt -i=$COVERDIR -o cov.out
60+
go test ./environment/deploy/... -run=^Test_U_ -coverprofile "$COVERDIR/environment.out"
61+
go test ./install/deploy/... -run=^Test_U_ -coverprofile "$COVERDIR/install.out"
62+
go test ./webserver/... -run=^Test_U_ -coverprofile "$COVERDIR/webserver.out"
63+
64+
go install go.shabbyrobe.org/gocovmerge/cmd/gocovmerge@fa4f82cfbf4d57c646c1ed0f35002bf1b89fbf7a
65+
gocovmerge "$COVERDIR/environment.out" "$COVERDIR/install.out" "$COVERDIR/webserver.out" > cov.out
6466
6567
- name: Upload coverage to Coveralls
6668
uses: shogo82148/actions-goveralls@e6875f831db61e6abffbd8df91a2eb6cd24b46c9 # v1.9.1
@@ -76,16 +78,16 @@ jobs:
7678
go-version-file: 'go.work'
7779

7880
- name: Lint Webserver
79-
uses: golangci/golangci-lint-action@2226d7cb06a077cd73e56eedd38eecad18e5d837 # v6.5.0
81+
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
8082
with:
8183
working-directory: webserver
8284

8385
- name: Lint Environment
84-
uses: golangci/golangci-lint-action@2226d7cb06a077cd73e56eedd38eecad18e5d837 # v6.5.0
86+
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
8587
with:
8688
working-directory: environment/deploy
8789

8890
- name: Lint Install
89-
uses: golangci/golangci-lint-action@2226d7cb06a077cd73e56eedd38eecad18e5d837 # v6.5.0
91+
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
9092
with:
9193
working-directory: install/deploy

.golangci.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
version: "2"
2+
linters:
3+
default: none
4+
enable:
5+
- errcheck
6+
- goconst
7+
- gosec
8+
- govet
9+
- ineffassign
10+
- misspell
11+
- revive
12+
- staticcheck
13+
- unconvert
14+
- unused
15+
settings:
16+
gosec:
17+
excludes:
18+
- G107
19+
- G110
20+
- G204
21+
- G305
22+
- G401
23+
- G501
24+
exclusions:
25+
generated: lax
26+
presets:
27+
- comments
28+
- common-false-positives
29+
- legacy
30+
- std-error-handling
31+
paths:
32+
- third_party$
33+
- builtin$
34+
- examples$
35+
formatters:
36+
exclusions:
37+
generated: lax
38+
paths:
39+
- third_party$
40+
- builtin$
41+
- examples$

environment/deploy/integration/main_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,5 @@ func TestMain(m *testing.M) {
1717
}
1818
Server = server
1919

20-
if Server == "" {
21-
os.Exit(1)
22-
}
2320
os.Exit(m.Run())
2421
}

0 commit comments

Comments
 (0)