Skip to content

Commit b5852d6

Browse files
committed
mod: require Go 1.22+ and update workflows
Only support the latest two major releases of Go. Add exclude rule for gosec rule G114.
1 parent 962ad53 commit b5852d6

5 files changed

Lines changed: 10 additions & 9 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ jobs:
2424
uses: actions/checkout@v4
2525

2626
- name: Initialize CodeQL
27-
uses: github/codeql-action/init@v2
27+
uses: github/codeql-action/init@v3
2828
with:
2929
languages: go
3030

3131
- name: Perform CodeQL Analysis
32-
uses: github/codeql-action/analyze@v2
32+
uses: github/codeql-action/analyze@v3

.github/workflows/go.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
matrix:
1515
os: [ubuntu-latest, macos-latest, windows-latest]
16-
go: [1.21.x, 1.20.x] # when updating versions, update it below too.
16+
go: [1.23.x, 1.22.x] # when updating versions, update it below too.
1717
runs-on: ${{ matrix.os }}
1818
name: Test
1919
steps:
@@ -28,11 +28,11 @@ jobs:
2828

2929
- name: Test
3030
# TODO(henvic): Skip generating code coverage when not sending it to Coveralls to speed up testing.
31-
continue-on-error: ${{ matrix.os != 'ubuntu-latest' || matrix.go != '1.21.x' }}
31+
continue-on-error: ${{ matrix.os != 'ubuntu-latest' || matrix.go != '1.23.x' }}
3232
run: go test -race -covermode atomic -coverprofile=profile.cov ./...
3333

3434
- name: Code coverage
35-
if: ${{ matrix.os == 'ubuntu-latest' && matrix.go == '1.21.x' }}
35+
if: ${{ matrix.os == 'ubuntu-latest' && matrix.go == '1.23.x' }}
3636
uses: shogo82148/actions-goveralls@v1
3737
with:
3838
path-to-profile: profile.cov

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
steps:
1717

1818
- name: Set up Go 1.x
19-
uses: actions/setup-go@v4
19+
uses: actions/setup-go@v5
2020
with:
21-
go-version: "1.21.x"
21+
go-version: "1.23.x"
2222

2323
- name: Check out code
2424
uses: actions/checkout@v4

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module github.com/henvic/httpretty
22

3-
go 1.20
3+
go 1.22
44

55
require golang.org/x/tools v0.14.0

scripts/ci-lint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ source scripts/ci-lint-fmt.sh
1111
set -x
1212
go vet ./...
1313
staticcheck ./...
14-
gosec -quiet ./...
14+
# Exclude rule G114 due to example/server using it as a demo.
15+
gosec -quiet -exclude G114 ./...

0 commit comments

Comments
 (0)