Skip to content

Commit 023fb73

Browse files
Update to Go 1.25 and remove golangci-lint in favor of gofumpt (#2882)
* Update CI * Update golangci-lint configuration * Add gofumpt * Separate formatting and test steps * Update go directive to 1.23 * Remove golanci-lint files [no important files changed]
1 parent 53801c2 commit 023fb73

326 files changed

Lines changed: 565 additions & 1191 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Check formatting
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
- master
9+
pull_request:
10+
11+
jobs:
12+
test:
13+
name: Go ${{ matrix.go-version }} - ${{ matrix.os }}/${{ matrix.test-arch }}
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
go-version: [1.25.x]
19+
os: [ubuntu-24.04, windows-2025, macOS-latest]
20+
test-arch: [amd64]
21+
race: ["-race"]
22+
23+
include:
24+
- go-version: 1.25.x
25+
test-arch: "386"
26+
os: ubuntu-24.04
27+
race: ""
28+
- go-version: 1.25.x
29+
test-arch: "386"
30+
os: windows-2025
31+
race: ""
32+
33+
steps:
34+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
35+
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00
36+
with:
37+
go-version: ${{ matrix.go-version }}
38+
- name: Install gofumpt
39+
run: go install mvdan.cc/gofumpt@v0.9.1
40+
- name: Run gofumpt
41+
run: gofumpt -l .

.github/workflows/exercise-tests.yml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,33 +15,30 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
go-version: [1.21.x]
19-
os: [ubuntu-22.04, windows-2022, macOS-latest]
18+
go-version: [1.25.x]
19+
os: [ubuntu-24.04, windows-2025, macOS-latest]
2020
test-arch: [amd64]
2121
race: ["-race"]
2222

2323
include:
24-
- go-version: 1.21.x
24+
- go-version: 1.25.x
2525
test-arch: "386"
26-
os: ubuntu-22.04
26+
os: ubuntu-24.04
2727
race: ""
28-
- go-version: 1.21.x
28+
- go-version: 1.25.x
2929
test-arch: "386"
30-
os: windows-2022
30+
os: windows-2025
3131
race: ""
3232

3333
steps:
3434
- run: git config --global core.autocrlf false
35-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
35+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
3636

37-
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
37+
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00
3838
with:
3939
go-version: ${{ matrix.go-version }}
40-
41-
- name: Lint and Test exercises
40+
- name: Test exercises
4241
shell: bash
4342
env:
4443
GOARCH: ${{ matrix.test-arch }}
45-
run: |
46-
./bin/fetch-golangci-lint
47-
./bin/run-tests
44+
run: ./bin/run-tests

.github/workflows/gomod-sync.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ on:
1010
jobs:
1111
check:
1212
name: go.mod check
13-
runs-on: ubuntu-22.04
13+
runs-on: ubuntu-24.04
1414

1515
steps:
16-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
16+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
1717

18-
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
18+
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00
1919
with:
20-
go-version: 1.17
20+
go-version: 1.25
2121

2222
- name: Check go.mod files
2323
shell: bash

.github/workflows/stub-tests.yml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,31 +15,28 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
go-version: [1.21.x]
19-
os: [ubuntu-22.04, windows-2022, macOS-latest]
18+
go-version: [1.25.x]
19+
os: [ubuntu-24.04, windows-2025, macOS-latest]
2020
test-arch: [amd64]
2121
race: ["-race"]
2222

2323
include:
24-
- go-version: 1.21.x
24+
- go-version: 1.25.x
2525
test-arch: "386"
26-
os: ubuntu-22.04
26+
os: ubuntu-24.04
2727
race: ""
28-
- go-version: 1.21.x
28+
- go-version: 1.25.x
2929
test-arch: "386"
30-
os: windows-2022
30+
os: windows-2025
3131
race: ""
3232

3333
steps:
34-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
35-
36-
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
34+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
35+
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00
3736
with:
3837
go-version: ${{ matrix.go-version }}
39-
40-
- name: Run tests on stubs
38+
- name: Test stubs
4139
shell: bash
4240
env:
4341
GOARCH: ${{ matrix.test-arch }}
44-
run: |
45-
./bin/run-tests test-stubs
42+
run: ./bin/run-tests test-stubs

.golangci.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

bin/fetch-golangci-lint

Lines changed: 0 additions & 3 deletions
This file was deleted.

bin/run-tests

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,8 @@ if [ "$mode" = "$TEST_STUBS_MODE" ];then
122122
exit 0
123123
fi
124124

125-
echo "running linter and tests for exercises and exercise generators"
126-
# Run lint which is configured by .golangci.yml at the root of the repo
127-
# and if it's successful, run tests
128-
bin/golangci-lint run ./$tmp/... && go test -cpu 2 ./$tmp/...
125+
echo "running tests for exercises and exercise generators"
126+
go test ./$tmp/...
129127

130128
exitcode=$?
131129

@@ -142,8 +140,8 @@ for path in $paths_to_lint; do
142140
cd "$root"
143141
cd "$path"
144142

145-
echo "running linters and tests for $path/..."
146-
$root/bin/golangci-lint run ./... && go test -cpu 2 ./...
143+
echo "running tests for $path/..."
144+
go test ./...
147145

148146
exitcode=$?
149147
if [ $exitcode -ne 0 ]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module airportrobot
22

3-
go 1.18
3+
go 1.23
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module chance
22

3-
go 1.18
3+
go 1.23
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module annalyn
22

3-
go 1.18
3+
go 1.23

0 commit comments

Comments
 (0)