Skip to content

Commit 60c093a

Browse files
chore: use latest go (#264)
Co-authored-by: pshu <[email protected]>
1 parent 1d9cb49 commit 60c093a

File tree

6 files changed

+39
-19
lines changed

6 files changed

+39
-19
lines changed

.github/actions/setup-go/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Setup Go
44
inputs:
55
go-version:
66
description: Go version range to set up.
7-
default: '>=1.24.0'
7+
required: true
88
cache-name:
99
description: Name of scoped cache for this set up.
1010
default: 'cache'

.github/workflows/ci.yml

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@ permissions:
1212
# Optional: allow read access to pull requests. Use with `only-new-issues` option.
1313
pull-requests: read
1414

15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
17+
cancel-in-progress: ${{ github.ref_name != 'main' }}
18+
1519
env:
16-
GO_VERSION: '1.24.1'
17-
GOMAXPROCS: 4
20+
GOMAXPROCS: 8
1821

1922
jobs:
2023
test-go:
@@ -27,9 +30,10 @@ jobs:
2730
[
2831
rspack-ubuntu-22.04-large,
2932
rspack-windows-2022-large,
33+
windows-latest,
3034
rspack-darwin-14-medium,
3135
]
32-
go-version: ['1.24.1']
36+
go-version: ['1.25.0']
3337
steps:
3438
- name: Checkout code
3539
uses: actions/checkout@v4
@@ -45,21 +49,37 @@ jobs:
4549
with:
4650
go-version: ${{ matrix.go-version }}
4751
cache-name: test-go
52+
- name: Unit Test
53+
run: |
54+
go test -parallel 4 ./internal/...
55+
go-lint:
56+
name: Go Lint
57+
runs-on: rspack-ubuntu-22.04-large
58+
steps:
59+
- name: Checkout code
60+
uses: actions/checkout@v4
61+
with:
62+
submodules: true
63+
- name: Setup Node
64+
uses: actions/setup-node@v4
65+
with:
66+
node-version: '24'
67+
- name: Setup Go
68+
uses: ./.github/actions/setup-go
69+
with:
70+
go-version: 1.25.0
71+
cache-name: go-lint
4872
- name: golangci-lint
49-
if: runner.os == 'Linux'
5073
uses: golangci/golangci-lint-action@v8
5174
with:
52-
version: v2.3.0
75+
version: v2.4.0
5376
args: --timeout=5m ./cmd/... ./internal/...
77+
5478
- name: go vet
55-
if: runner.os == 'Linux'
5679
run: npm run lint:go
80+
5781
- name: go fmt
58-
if: runner.os == 'Linux'
5982
run: npm run format:go
60-
- name: Unit Test
61-
run: |
62-
go test -parallel 4 ./internal/...
6383

6484
test-node:
6585
name: Test npm packages
@@ -68,7 +88,7 @@ jobs:
6888
fail-fast: false
6989
matrix:
7090
os: [rspack-ubuntu-22.04-large, windows-latest]
71-
go-version: ['1.24.1']
91+
go-version: ['1.25.0']
7292
steps:
7393
- name: Checkout code
7494
uses: actions/checkout@v4

.github/workflows/copilot-setup-steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- name: Setup Go
3939
uses: actions/setup-go@v5
4040
with:
41-
go-version: 1.24.1
41+
go-version: 1.25.0
4242
- name: Install pnpm
4343
run: corepack enable
4444
- name: Install JavaScript dependencies

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ on:
4242
- extension
4343
permissions:
4444
contents: read
45-
env:
46-
GO_VERSION: '1.24.1'
4745

4846
jobs:
4947
publish-npm:
@@ -272,6 +270,8 @@ jobs:
272270
run: xvfb-run -a pnpm -r test
273271

274272
build:
273+
env:
274+
GOMAXPROCS: 8
275275
name: Build-Binaries
276276
strategy:
277277
fail-fast: false

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module github.com/web-infra-dev/rslint
22

3-
go 1.24.2
3+
go 1.25.0
44

5-
toolchain go1.24.4
5+
toolchain go1.25.0
66

77
replace (
88
github.com/microsoft/typescript-go/shim/ast => ./shim/ast

go.work

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
go 1.24.2
1+
go 1.25.0
22

3-
toolchain go1.24.4
3+
toolchain go1.25.0
44

55
use (
66
.

0 commit comments

Comments
 (0)