Skip to content

Commit c0d7c9b

Browse files
committed
Update CI workflows
- golangci-lint-action v2 -> v6, remove deleted linters (structcheck, deadcode), add explicit setup-go step, remove GO111MODULE - codeql-action v2 -> v3, remove manual PR checkout workaround - Skip global installability test on non-tag pushes - Windows: test all packages (./...), add oldstable Go version
1 parent a97b079 commit c0d7c9b

File tree

4 files changed

+14
-54
lines changed

4 files changed

+14
-54
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ name: "CodeQL"
22

33
on:
44
push:
5-
branches: [master, ]
5+
branches: [master]
66
pull_request:
7-
# The branches below must be a subset of the branches above
87
branches: [master]
98
schedule:
109
- cron: '0 10 * * 4'
@@ -17,38 +16,12 @@ jobs:
1716
steps:
1817
- name: Checkout repository
1918
uses: actions/checkout@v4
20-
with:
21-
# We must fetch at least the immediate parents so that if this is
22-
# a pull request then we can checkout the head.
23-
fetch-depth: 2
24-
25-
# If this run was triggered by a pull request event, then checkout
26-
# the head of the pull request instead of the merge commit.
27-
- run: git checkout HEAD^2
28-
if: ${{ github.event_name == 'pull_request' }}
2919

30-
# Initializes the CodeQL tools for scanning.
3120
- name: Initialize CodeQL
32-
uses: github/codeql-action/init@v2
33-
# Override language selection by uncommenting this and choosing your languages
34-
# with:
35-
# languages: go, javascript, csharp, python, cpp, java
21+
uses: github/codeql-action/init@v3
3622

37-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
38-
# If this step fails, then you should remove it and run the build manually (see below)
3923
- name: Autobuild
40-
uses: github/codeql-action/autobuild@v2
41-
42-
# ℹ️ Command-line programs to run using the OS shell.
43-
# 📚 https://git.io/JvXDl
44-
45-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
46-
# and modify them (or add more) to build your code if your project
47-
# uses a compiled language
48-
49-
#- run: |
50-
# make bootstrap
51-
# make release
24+
uses: github/codeql-action/autobuild@v3
5225

5326
- name: Perform CodeQL Analysis
54-
uses: github/codeql-action/analyze@v2
27+
uses: github/codeql-action/analyze@v3

.github/workflows/go.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ jobs:
4343
run: GOOS=js GOARCH=wasm go build . ./storage ./tracker/...
4444

4545
- name: Test global installability
46+
if: startsWith(github.ref, 'refs/tags/v')
4647
run: |
4748
# Create isolated environment
4849
TMPDIR=$(mktemp -d)

.github/workflows/linter.yml

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,13 @@ jobs:
1010
golint:
1111
name: Lint
1212
runs-on: ubuntu-latest
13-
env:
14-
GO111MODULE: on
1513
steps:
1614
- uses: actions/checkout@v4
17-
- uses: golangci/golangci-lint-action@v2
15+
- uses: actions/setup-go@v5
16+
with:
17+
go-version: stable
18+
- uses: golangci/golangci-lint-action@v6
1819
with:
1920
version: latest
20-
21-
# Optional: working directory, useful for monorepos
22-
# working-directory: somedir
23-
24-
# Optional: golangci-lint command line arguments.
25-
args: -D errcheck,unused,structcheck,deadcode
26-
27-
# Optional: show only new issues if it's a pull request. The default value is `false`.
21+
args: -D errcheck,unused
2822
only-new-issues: true
29-
30-
# Optional: if set to true then the action will use pre-installed Go.
31-
skip-go-installation: true
32-
33-
# Optional: if set to true then the action don't cache or restore ~/go/pkg.
34-
# skip-pkg-cache: true
35-
36-
# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
37-
# skip-build-cache: true

.github/workflows/windows.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ jobs:
88
runs-on: windows-latest
99
strategy:
1010
matrix:
11-
go-version: [stable]
11+
go-version: [stable, oldstable]
12+
fail-fast: false
1213
steps:
1314
- uses: actions/checkout@v4
1415
with:
@@ -17,7 +18,7 @@ jobs:
1718
with:
1819
go-version: ${{ matrix.go-version }}
1920
- run: go mod download
20-
- name: Test torrent package
21-
run: go test -count=1 -v .
21+
- name: Test packages
22+
run: go test -count=1 ./...
2223
env:
2324
CGO_ENABLED: "0"

0 commit comments

Comments
 (0)