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
@@ -79,16 +84,18 @@ jobs:
79
84
run : pnpm install --frozen-lockfile
80
85
81
86
- name : Format
87
+ if : runner.os == 'Linux'
82
88
run : pnpm format:check
83
89
84
90
- name : Build
85
91
run : pnpm build
86
92
87
93
- name : TypeCheck
94
+ if : runner.os == 'Linux'
88
95
run : pnpm typecheck
89
96
90
- - name : Install xvfb and dependencies
91
- if : ${{ runner.os == 'Linux' && runner.environment == 'self-hosted' }}
97
+ - name : Install xvfb and dependencies (Linux only)
98
+ if : runner.os == 'Linux'
92
99
run : |
93
100
sudo apt update
94
101
sudo apt install -y libasound2 libgbm1 libgtk-3-0 libnss3 xvfb
97
104
uses : lynx-infra/cache@5c6160a6a4c7fca80a2f3057bb9dfc9513fcb732
98
105
with :
99
106
path : packages/vscode-extension/.vscode-test
100
- key : ' vscode-test'
107
+ key : vscode-test-${{ matrix.os }}
101
108
restore-keys : |
102
- - ' vscode-test-'
109
+ vscode-test-${{ matrix.os }}-
103
110
104
111
- name : Test on Linux
105
112
if : runner.os == 'Linux'
@@ -110,17 +117,19 @@ jobs:
110
117
run : pnpm -r test
111
118
112
119
- name : Check Spell
120
+ if : runner.os != 'Linux'
113
121
run : pnpm check-spell
114
122
115
123
- name : Lint
124
+ if : runner.os != 'Linux'
116
125
run : pnpm run lint
117
126
118
127
done :
119
128
needs :
120
129
- test-go
121
130
- test-node
122
131
if : always()
123
- runs-on : rspack- ubuntu-22.04-large
132
+ runs-on : ubuntu-latest
124
133
name : CI Done
125
134
steps :
126
135
- run : exit 1
0 commit comments