Skip to content

Commit 75f21e8

Browse files
AchoArnoldCopilot
andcommitted
Fix CI: use golangci-lint-action and update actions to latest
Replace unreliable curl install script with official golangci-lint-action. Update checkout and setup-go to v4/v5 and use go-version-file. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 0c1e419 commit 75f21e8

1 file changed

Lines changed: 9 additions & 17 deletions

File tree

‎.github/workflows/main.yml‎

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,26 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v4
1414

1515
- name: Setup Go
16-
uses: actions/setup-go@v2
17-
18-
- name: Setup Dependencies
19-
run: |
20-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sudo sh -s -- -b $GOPATH/bin
21-
golangci-lint --version
22-
go get golang.org/x/tools/cmd/cover
23-
go get -t -v ./...
16+
uses: actions/setup-go@v5
17+
with:
18+
go-version-file: go.mod
2419

2520
- name: Golang CI Lint
26-
run: golangci-lint run
21+
uses: golangci/golangci-lint-action@v6
2722

2823
Test:
2924
runs-on: ubuntu-latest
3025
steps:
3126
- name: Checkout
32-
uses: actions/checkout@v2
27+
uses: actions/checkout@v4
3328

3429
- name: Setup Go
35-
uses: actions/setup-go@v2
36-
37-
- name: Setup Dependencies
38-
run: |
39-
go get golang.org/x/tools/cmd/cover
40-
go get -t -v ./...
30+
uses: actions/setup-go@v5
31+
with:
32+
go-version-file: go.mod
4133

4234
- name: Run Tests
4335
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic

0 commit comments

Comments
 (0)