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
diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml
index 6a45ef3..bfcdaa7 100644
--- a/.github/workflows/linter.yml
+++ b/.github/workflows/linter.yml
@@ -2,7 +2,7 @@
on: [push, pull_request]
concurrency:
- group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
+ group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true
jobs:
@@ -10,8 +10,8 @@
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
- - name: golangci-lint
- uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64 # v6.0.1
- with:
- version: v1.52.2
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+ - name: golangci-lint
+ uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0
+ with:
+ version: v2.1.2
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index a82105b..73ff688 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -9,7 +9,7 @@
- master
concurrency:
- group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
+ group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true
jobs:
@@ -26,14 +26,14 @@
runs-on: ${{ matrix.platform }}
steps:
- - uses: actions/checkout@v4
- - uses: actions/setup-go@v5
- with:
- go-version: ${{ matrix.go-version }}
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+ - uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
+ with:
+ go-version: ${{ matrix.go-version }}
- - name: Run go test
- run: go test -v -race -coverprofile coverage.txt -covermode atomic ./...
+ - name: Run go test
+ run: go test -v -race -coverprofile coverage.txt -covermode atomic ./...
- - name: Upload coverage to Codecov
- if: ${{ matrix.update-coverage }}
- uses: codecov/codecov-action@54bcd8715eee62d40e33596ef5e8f0f48dbbccab #v4.1.0
+ - name: Upload coverage to Codecov
+ if: ${{ matrix.update-coverage }}
+ uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d #v5.4.2
diff --git a/.golangci.yml b/.golangci.yml
index 112c817..cc8bbc9 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -1,13 +1,16 @@
+version: "2"
linters:
enable:
- dogsled
- dupl
- - gofmt
- - goimports
- gosec
- misspell
- nakedret
- - stylecheck
+ - staticcheck
- unconvert
- unparam
- whitespace
+formatters:
+ enable:
+ - gofmt
+ - goimports