Skip to content

Commit 934af36

Browse files
committed
ci: update GitHub Actions configurations and dependencies
- Update the cron schedule in the CodeQL workflow from `41 23 * * 6` to `"41 23 * * 6"` - Change the language setting in the CodeQL workflow from `[ 'go' ]` to `["go"]` - Update the CodeQL action version from `v2` to `v3` in the CodeQL workflow - Update the golangci/golangci-lint-action version from `v3` to `v4` in the Go workflow - Update the Go version from `1.20` to `1.18` in the `go.mod` file Signed-off-by: appleboy <[email protected]>
1 parent 25b802b commit 934af36

File tree

3 files changed

+29
-28
lines changed

3 files changed

+29
-28
lines changed

.github/workflows/codeql.yml

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ name: "CodeQL"
1313

1414
on:
1515
push:
16-
branches: [ master ]
16+
branches: [master]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [ master ]
19+
branches: [master]
2020
schedule:
21-
- cron: '41 23 * * 6'
21+
- cron: "41 23 * * 6"
2222

2323
jobs:
2424
analyze:
@@ -32,23 +32,21 @@ jobs:
3232
strategy:
3333
fail-fast: false
3434
matrix:
35-
language: [ 'go' ]
36-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37-
# Learn more about CodeQL language support at https://git.io/codeql-language-support
35+
language: ["go"]
3836

3937
steps:
40-
- name: Checkout repository
41-
uses: actions/checkout@v4
38+
- name: Checkout repository
39+
uses: actions/checkout@v4
4240

43-
# Initializes the CodeQL tools for scanning.
44-
- name: Initialize CodeQL
45-
uses: github/codeql-action/init@v3
46-
with:
47-
languages: ${{ matrix.language }}
48-
# If you wish to specify custom queries, you can do so here or in a config file.
49-
# By default, queries listed here will override any specified in a config file.
50-
# Prefix the list here with "+" to use these queries and those in the config file.
51-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
41+
# Initializes the CodeQL tools for scanning.
42+
- name: Initialize CodeQL
43+
uses: github/codeql-action/init@v3
44+
with:
45+
languages: ${{ matrix.language }}
46+
# If you wish to specify custom queries, you can do so here or in a config file.
47+
# By default, queries listed here will override any specified in a config file.
48+
# Prefix the list here with "+" to use these queries and those in the config file.
49+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
5250

53-
- name: Perform CodeQL Analysis
54-
uses: github/codeql-action/analyze@v2
51+
- name: Perform CodeQL Analysis
52+
uses: github/codeql-action/analyze@v3

.github/workflows/go.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,25 @@ jobs:
1212
lint:
1313
runs-on: ubuntu-latest
1414
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
1520
- name: Setup go
1621
uses: actions/setup-go@v5
1722
with:
18-
go-version: '^1.16'
19-
- name: Checkout repository
20-
uses: actions/checkout@v4
23+
go-version-file: go.mod
24+
check-latest: true
2125
- name: Setup golangci-lint
22-
uses: golangci/golangci-lint-action@v3
26+
uses: golangci/golangci-lint-action@v4
2327
with:
24-
version: v1.49.0
2528
args: --verbose
2629
test:
2730
strategy:
2831
matrix:
2932
os: [ubuntu-latest]
30-
go: [1.18, 1.19, '1.20']
33+
go: [1.18, 1.19, "1.20", 1.21, 1.22]
3134
include:
3235
- os: ubuntu-latest
3336
go-build: ~/.cache/go-build
@@ -49,7 +52,7 @@ jobs:
4952
with:
5053
ref: ${{ github.ref }}
5154

52-
- uses: actions/cache@v3
55+
- uses: actions/cache@v4
5356
with:
5457
path: |
5558
${{ matrix.go-build }}
@@ -62,6 +65,6 @@ jobs:
6265
go test -v -covermode=atomic -coverprofile=coverage.out
6366
6467
- name: Upload coverage to Codecov
65-
uses: codecov/codecov-action@v3
68+
uses: codecov/codecov-action@v4
6669
with:
6770
flags: ${{ matrix.os }},go-${{ matrix.go }}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/gin-contrib/pprof
22

3-
go 1.20
3+
go 1.18
44

55
require github.com/gin-gonic/gin v1.9.1
66

0 commit comments

Comments
 (0)