Skip to content

Commit 243d79a

Browse files
committed
update github action workflow versions
- pin to exact commits rather than version tags - format a few yaml files with prettier - update golangci-lint config for v2 syntax
1 parent b64aef0 commit 243d79a

File tree

3 files changed

+22
-19
lines changed

3 files changed

+22
-19
lines changed

.github/workflows/linter.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ name: linter
22
on: [push, pull_request]
33

44
concurrency:
5-
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
5+
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
66
cancel-in-progress: true
77

88
jobs:
99
lint:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- uses: actions/checkout@v4
14-
- name: golangci-lint
15-
uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64 # v6.0.1
16-
with:
17-
version: v1.52.2
13+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
14+
- name: golangci-lint
15+
uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0
16+
with:
17+
version: v2.1.2

.github/workflows/tests.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- master
1010

1111
concurrency:
12-
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
12+
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
1313
cancel-in-progress: true
1414

1515
jobs:
@@ -26,14 +26,14 @@ jobs:
2626
runs-on: ${{ matrix.platform }}
2727

2828
steps:
29-
- uses: actions/checkout@v4
30-
- uses: actions/setup-go@v5
31-
with:
32-
go-version: ${{ matrix.go-version }}
29+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
30+
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
31+
with:
32+
go-version: ${{ matrix.go-version }}
3333

34-
- name: Run go test
35-
run: go test -v -race -coverprofile coverage.txt -covermode atomic ./...
34+
- name: Run go test
35+
run: go test -v -race -coverprofile coverage.txt -covermode atomic ./...
3636

37-
- name: Upload coverage to Codecov
38-
if: ${{ matrix.update-coverage }}
39-
uses: codecov/codecov-action@54bcd8715eee62d40e33596ef5e8f0f48dbbccab #v4.1.0
37+
- name: Upload coverage to Codecov
38+
if: ${{ matrix.update-coverage }}
39+
uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d #v5.4.2

.golangci.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1+
version: "2"
12
linters:
23
enable:
34
- dogsled
45
- dupl
5-
- gofmt
6-
- goimports
76
- gosec
87
- misspell
98
- nakedret
10-
- stylecheck
9+
- staticcheck
1110
- unconvert
1211
- unparam
1312
- whitespace
13+
formatters:
14+
enable:
15+
- gofmt
16+
- goimports

0 commit comments

Comments
 (0)