-
Notifications
You must be signed in to change notification settings - Fork 0
225 lines (217 loc) · 6.29 KB
/
ci.yml
File metadata and controls
225 lines (217 loc) · 6.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
rsbuild:
strategy:
matrix:
include:
- suite: rslib
os: ubuntu-latest
- suite: rstest
os: ubuntu-latest
- suite: rspress
os: ubuntu-latest
- suite: plugins
os: ubuntu-latest
- suite: modernjs
os: ubuntu-latest
- suite: examples
os: ubuntu-latest
fail-fast: false
runs-on: ${{ matrix.os }}
name: rsbuild (${{ matrix.suite }})
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/build-rsbuild
- name: Install
run: pnpm install --frozen-lockfile --prefer-offline
- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v3
- run: >-
pnpm tsx ecosystem-ci.ts
run-suites
--stack rsbuild
${{ matrix.suite }}
rslib:
strategy:
matrix:
include:
- suite: rsbuild
os: ubuntu-latest
- suite: rspack
os: ubuntu-latest
- suite: rstest
os: ubuntu-latest
- suite: rspress
os: ubuntu-latest
- suite: rsdoctor
os: ubuntu-latest
- suite: modernjs
os: ubuntu-latest
fail-fast: false
runs-on: ${{ matrix.os }}
name: rslib (${{ matrix.suite }})
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/build-rslib
- uses: moonrepo/setup-rust@v1
- name: Install
run: |
corepack enable
pnpm install --frozen-lockfile --prefer-offline
- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v3
- run: >-
pnpm tsx ecosystem-ci.ts
run-suites
--stack rslib
${{ matrix.suite }}
rstest:
strategy:
matrix:
include:
- suite: rslib
os: ubuntu-latest
- suite: rsbuild
os: ubuntu-latest
- suite: rsdoctor
os: ubuntu-latest
- suite: rspress
os: ubuntu-latest
- suite: examples
os: ubuntu-latest
- suite: modernjs
os: ubuntu-latest
fail-fast: false
runs-on: ${{ matrix.os }}
name: rstest (${{ matrix.suite }})
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/build-rstest
- name: Install
run: |
corepack enable
pnpm install --frozen-lockfile --prefer-offline
- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v3
- run: >-
pnpm tsx ecosystem-ci.ts
run-suites
--stack rstest
${{ matrix.suite }}
rsdoctor:
strategy:
matrix:
include:
- suite: rsbuild
os: ubuntu-latest
fail-fast: false
runs-on: ${{ matrix.os }}
name: rsdoctor (${{ matrix.suite }})
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/build-rsdoctor
- uses: moonrepo/setup-rust@v1
- name: Install
run: |
corepack enable
pnpm install --frozen-lockfile --prefer-offline
- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v3
- run: >-
pnpm tsx ecosystem-ci.ts
run-suites
--stack rsdoctor
${{ matrix.suite }}
get-runner-labels:
name: Get Runner Labels
uses: ./.github/workflows/get-runner-labels.yml
prepare-rspack-binding:
name: Prepare Rspack Binding
needs: get-runner-labels
runs-on: ${{ fromJSON(needs.get-runner-labels.outputs.LINUX_RUNNER_LABELS) }}
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/prepare-rspack-binding
rspack:
needs:
- get-runner-labels
- prepare-rspack-binding
strategy:
matrix:
include:
- suite: modernjs
os: ubuntu-latest
- suite: _selftest
os: ubuntu-latest
- suite: rspress
os: ubuntu-latest
- suite: rsbuild
os: ubuntu-latest
- suite: examples
os: ubuntu-latest
- suite: rslib
os: ubuntu-latest
- suite: rstest
os: ubuntu-latest
- suite: rsdoctor
os: ubuntu-latest
- suite: devserver
os: ubuntu-latest
- suite: plugin
os: ubuntu-latest
- suite: lynx-stack
os: ubuntu-latest
- suite: rsbuild-rsc-plugin
os: ubuntu-latest
fail-fast: false
runs-on: ${{ matrix.os }}
name: rspack (${{ matrix.suite }})
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/build-rspack
- name: Install
run: pnpm install --frozen-lockfile --prefer-offline
- name: Lint
if: matrix.suite == '_selftest'
run: pnpm lint
- name: Setup Node.js
if: matrix.suite == 'lynx-stack' || matrix.suite == '_selftest'
uses: actions/setup-node@v4
with:
node-version: 22.22.2
- name: Setup Rust
if: matrix.suite == 'lynx-stack'
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v3
# Verdaccio is required for rspack-stack testing.
# pnpm has a known bug (pnpm/pnpm#9270) where file: protocol overrides
# for packages with native optionalDependencies cause version mismatch
# or silent registry fallback. Publishing to a local registry avoids this.
- name: Publish rspack to Verdaccio
id: publish-rspack
if: matrix.suite != '_selftest'
uses: ./.github/actions/publish-rspack-to-verdaccio
- name: Run suite (with Verdaccio)
if: matrix.suite != '_selftest'
run: >-
NPM_CONFIG_REGISTRY=http://localhost:4873
pnpm tsx ecosystem-ci.ts
run-suites
--stack rspack
--release "${{ steps.publish-rspack.outputs.version }}"
${{ matrix.suite }}
- name: Run suite (selftest)
if: matrix.suite == '_selftest'
run: >-
pnpm tsx ecosystem-ci.ts
run-suites
--stack rspack
${{ matrix.suite }}