19
19
jobs :
20
20
test-go :
21
21
name : Test Go
22
- runs-on : rspack-ubuntu-22.04-large
22
+ runs-on : ${{ matrix.runner }}
23
23
strategy :
24
24
matrix :
25
+ runner : [rspack-ubuntu-22.04-large, windows-latest]
25
26
go-version : ['1.24.1']
26
27
steps :
27
28
- name : Checkout code
@@ -39,23 +40,27 @@ jobs:
39
40
go-version : ${{ matrix.go-version }}
40
41
cache-name : test-go
41
42
- name : golangci-lint
43
+ if : runner.os != 'Linux'
42
44
uses : golangci/golangci-lint-action@v8
43
45
with :
44
46
version : v2.3.0
45
47
args : --timeout=5m ./cmd/... ./internal/...
46
48
- name : go vet
49
+ if : runner.os != 'Linux'
47
50
run : npm run lint:go
48
51
- name : go fmt
52
+ if : runner.os != 'Linux'
49
53
run : npm run format:go
50
54
- name : Unit Test
51
55
run : |
52
56
go test -parallel 4 ./internal/...
53
57
54
58
test-node :
55
59
name : Test npm packages
56
- runs-on : rspack-ubuntu-22.04-large
60
+ runs-on : ${{ matrix.os }}
57
61
strategy :
58
62
matrix :
63
+ os : [rspack-ubuntu-22.04-large, windows-latest]
59
64
go-version : ['1.24.1']
60
65
steps :
61
66
- name : Checkout code
@@ -73,16 +78,18 @@ jobs:
73
78
uses : ./.github/actions/setup-node
74
79
75
80
- name : Format
81
+ if : runner.os == 'Linux'
76
82
run : pnpm format:check
77
83
78
84
- name : Build
79
85
run : pnpm build
80
86
81
87
- name : TypeCheck
88
+ if : runner.os == 'Linux'
82
89
run : pnpm typecheck
83
90
84
- - name : Install xvfb and dependencies
85
- if : ${{ runner.os == 'Linux' && runner.environment == 'self-hosted' }}
91
+ - name : Install xvfb and dependencies (Linux only)
92
+ if : runner.os == 'Linux'
86
93
run : |
87
94
sudo apt update
88
95
sudo apt install -y libasound2 libgbm1 libgtk-3-0 libnss3 xvfb
91
98
uses : lynx-infra/cache@5c6160a6a4c7fca80a2f3057bb9dfc9513fcb732
92
99
with :
93
100
path : packages/vscode-extension/.vscode-test
94
- key : ' vscode-test'
101
+ key : vscode-test-${{ matrix.os }}
95
102
restore-keys : |
96
- - ' vscode-test-'
103
+ vscode-test-${{ matrix.os }}-
97
104
98
105
- name : Test on Linux
99
106
if : runner.os == 'Linux'
@@ -104,17 +111,19 @@ jobs:
104
111
run : pnpm -r test
105
112
106
113
- name : Check Spell
114
+ if : runner.os != 'Linux'
107
115
run : pnpm check-spell
108
116
109
117
- name : Lint
118
+ if : runner.os != 'Linux'
110
119
run : pnpm run lint
111
120
112
121
done :
113
122
needs :
114
123
- test-go
115
124
- test-node
116
125
if : always()
117
- runs-on : rspack- ubuntu-22.04-large
126
+ runs-on : ubuntu-latest
118
127
name : CI Done
119
128
steps :
120
129
- run : exit 1
0 commit comments