Skip to content

Commit 2f9e8a7

Browse files
committed
chore: try fix windows
1 parent a39e56a commit 2f9e8a7

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ runs:
2121

2222
- name: Clean Go module cache dir
2323
shell: bash
24+
if: runner.os == 'linux'
2425
run: sudo rm -rf ~/go/pkg/mod/golang.org/toolchain*
2526

2627
- name: Go cache

.github/workflows/ci.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ env:
1919
jobs:
2020
test-go:
2121
name: Test Go
22-
runs-on: rspack-ubuntu-22.04-large
22+
runs-on: ${{ matrix.runner }}
2323
strategy:
2424
matrix:
25+
runner: [rspack-ubuntu-22.04-large, windows-latest]
2526
go-version: ['1.24.1']
2627
steps:
2728
- name: Checkout code
@@ -39,23 +40,27 @@ jobs:
3940
go-version: ${{ matrix.go-version }}
4041
cache-name: test-go
4142
- name: golangci-lint
43+
if: runner.os != 'Linux'
4244
uses: golangci/golangci-lint-action@v8
4345
with:
4446
version: v2.3.0
4547
args: --timeout=5m ./cmd/... ./internal/...
4648
- name: go vet
49+
if: runner.os != 'Linux'
4750
run: npm run lint:go
4851
- name: go fmt
52+
if: runner.os != 'Linux'
4953
run: npm run format:go
5054
- name: Unit Test
5155
run: |
5256
go test -parallel 4 ./internal/...
5357
5458
test-node:
5559
name: Test npm packages
56-
runs-on: rspack-ubuntu-22.04-large
60+
runs-on: ${{ matrix.os }}
5761
strategy:
5862
matrix:
63+
os: [rspack-ubuntu-22.04-large, windows-latest]
5964
go-version: ['1.24.1']
6065
steps:
6166
- name: Checkout code
@@ -79,16 +84,18 @@ jobs:
7984
run: pnpm install --frozen-lockfile
8085

8186
- name: Format
87+
if: runner.os == 'Linux'
8288
run: pnpm format:check
8389

8490
- name: Build
8591
run: pnpm build
8692

8793
- name: TypeCheck
94+
if: runner.os == 'Linux'
8895
run: pnpm typecheck
8996

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'
9299
run: |
93100
sudo apt update
94101
sudo apt install -y libasound2 libgbm1 libgtk-3-0 libnss3 xvfb
@@ -97,9 +104,9 @@ jobs:
97104
uses: lynx-infra/cache@5c6160a6a4c7fca80a2f3057bb9dfc9513fcb732
98105
with:
99106
path: packages/vscode-extension/.vscode-test
100-
key: 'vscode-test'
107+
key: vscode-test-${{ matrix.os }}
101108
restore-keys: |
102-
- 'vscode-test-'
109+
vscode-test-${{ matrix.os }}-
103110
104111
- name: Test on Linux
105112
if: runner.os == 'Linux'
@@ -110,17 +117,19 @@ jobs:
110117
run: pnpm -r test
111118

112119
- name: Check Spell
120+
if: runner.os != 'Linux'
113121
run: pnpm check-spell
114122

115123
- name: Lint
124+
if: runner.os != 'Linux'
116125
run: pnpm run lint
117126

118127
done:
119128
needs:
120129
- test-go
121130
- test-node
122131
if: always()
123-
runs-on: rspack-ubuntu-22.04-large
132+
runs-on: ubuntu-latest
124133
name: CI Done
125134
steps:
126135
- run: exit 1

0 commit comments

Comments
 (0)