1313 description : " commit sha"
1414 required : true
1515 type : string
16+ updateComment :
17+ description : " whether to update the PR comment"
18+ required : false
19+ type : boolean
20+ default : false
1621 repo :
1722 description : " rspack repository to use"
1823 required : true
3540 - devserver
3641 - plugin
3742 - lynx-stack
43+ - rsbuild-rsc-plugin
3844 suiteRefType :
3945 description : " type of suite ref to use"
4046 required : true
6874 ref : ${{ inputs.commitSHA }}
6975
7076 execute-selected-suite :
71- runs-on : ubuntu-22.04
77+ runs-on : ubuntu-latest
7278 needs : [get-runner-labels, prepare-binding]
7379 if : " inputs.suite != '-'"
7480 steps :
@@ -77,10 +83,44 @@ jobs:
7783 with :
7884 repository : ${{ inputs.repo }}
7985 ref : ${{ inputs.commitSHA }}
86+ - name : Setup Rust
87+ if : inputs.suite == 'lynx-stack'
88+ uses : actions-rust-lang/setup-rust-toolchain@v1
8089 - run : pnpm i --frozen-lockfile
8190 - name : Expose GitHub Runtime
8291 uses : crazy-max/ghaction-github-runtime@v3
83- - run : >-
92+ # Verdaccio is required for rspack-stack testing.
93+ # pnpm has a known bug (pnpm/pnpm#9270) where file: protocol overrides
94+ # for packages with native optionalDependencies cause version mismatch
95+ # or silent registry fallback. Publishing to a local registry avoids this.
96+ - name : Setup Verdaccio
97+ if : inputs.suite != '_selftest'
98+ run : |
99+ pnpm verdaccio --config verdaccio.yaml &
100+ printf '\n//localhost:4873/:_authToken="this-is-a-fake-token"\n' >> ~/.npmrc
101+ sleep 3
102+ - name : Publish rspack packages to Verdaccio
103+ if : inputs.suite != '_selftest'
104+ working-directory : workspace/rspack
105+ run : |
106+ for pkg in $(pnpm -r --filter "@rspack/binding*..." --filter "@rspack/core..." --filter "@rspack/tracing..." --filter "@rspack/test-tools..." exec -- node -p "process.cwd()"); do
107+ jq 'del(.publishConfig.provenance)' "$pkg/package.json" > "$pkg/package.json.tmp"
108+ mv "$pkg/package.json.tmp" "$pkg/package.json"
109+ done
110+ pnpm -r --filter "@rspack/binding*..." --filter "@rspack/core..." --filter "@rspack/tracing..." --filter "@rspack/test-tools..." publish --no-git-checks --provenance=false --access public --registry=http://localhost:4873
111+ - name : Run suite (with Verdaccio)
112+ if : inputs.suite != '_selftest'
113+ run : >-
114+ NPM_CONFIG_REGISTRY=http://localhost:4873
115+ pnpm tsx ecosystem-ci.ts
116+ run-suites
117+ --stack rspack
118+ --release "$(node -p "require('./workspace/rspack/packages/rspack/package.json').version")"
119+ --suite-${{ inputs.suiteRefType }} ${{ inputs.suiteRef }}
120+ ${{ inputs.suite }}
121+ - name : Run suite (selftest)
122+ if : inputs.suite == '_selftest'
123+ run : >-
84124 pnpm tsx ecosystem-ci.ts
85125 run-suites
86126 --stack rspack
@@ -94,27 +134,29 @@ jobs:
94134 matrix :
95135 include :
96136 - suite : modernjs
97- os : ubuntu-22.04
137+ os : ubuntu-latest
98138 - suite : _selftest
99- os : ubuntu-22.04
139+ os : ubuntu-latest
100140 - suite : rsdoctor
101- os : ubuntu-22.04
141+ os : ubuntu-latest
102142 - suite : rspress
103- os : ubuntu-22.04
143+ os : ubuntu-latest
104144 - suite : rslib
105- os : ubuntu-22.04
145+ os : ubuntu-latest
106146 - suite : rstest
107- os : ubuntu-22.04
147+ os : ubuntu-latest
108148 - suite : rsbuild
109- os : ubuntu-22.04
149+ os : ubuntu-latest
110150 - suite : examples
111- os : ubuntu-22.04
151+ os : ubuntu-latest
112152 - suite : devserver
113- os : ubuntu-22.04
153+ os : ubuntu-latest
114154 - suite : plugin
115- os : ubuntu-22.04
155+ os : ubuntu-latest
116156 - suite : lynx-stack
117- os : ubuntu-22.04
157+ os : ubuntu-latest
158+ - suite : rsbuild-rsc-plugin
159+ os : ubuntu-latest
118160 fail-fast : false
119161 runs-on : ${{ matrix.os }}
120162 name : execute-all (${{ matrix.suite }})
@@ -128,7 +170,33 @@ jobs:
128170 - run : pnpm i --frozen-lockfile
129171 - name : Expose GitHub Runtime
130172 uses : crazy-max/ghaction-github-runtime@v3
131- - run : >-
173+ - name : Setup Verdaccio
174+ if : matrix.suite != '_selftest'
175+ run : |
176+ pnpm verdaccio --config verdaccio.yaml &
177+ printf '\n//localhost:4873/:_authToken="this-is-a-fake-token"\n' >> ~/.npmrc
178+ sleep 3
179+ - name : Publish rspack packages to Verdaccio
180+ if : matrix.suite != '_selftest'
181+ working-directory : workspace/rspack
182+ run : |
183+ for pkg in $(pnpm -r --filter "@rspack/binding*..." --filter "@rspack/core..." --filter "@rspack/tracing..." --filter "@rspack/test-tools..." exec -- node -p "process.cwd()"); do
184+ jq 'del(.publishConfig.provenance)' "$pkg/package.json" > "$pkg/package.json.tmp"
185+ mv "$pkg/package.json.tmp" "$pkg/package.json"
186+ done
187+ pnpm -r --filter "@rspack/binding*..." --filter "@rspack/core..." --filter "@rspack/tracing..." --filter "@rspack/test-tools..." publish --no-git-checks --provenance=false --access public --registry=http://localhost:4873
188+ - name : Run suite (with Verdaccio)
189+ if : matrix.suite != '_selftest'
190+ run : >-
191+ NPM_CONFIG_REGISTRY=http://localhost:4873
192+ pnpm tsx ecosystem-ci.ts
193+ run-suites
194+ --stack rspack
195+ --release "$(node -p "require('./workspace/rspack/packages/rspack/package.json').version")"
196+ ${{ matrix.suite }}
197+ - name : Run suite (selftest)
198+ if : matrix.suite == '_selftest'
199+ run : >-
132200 pnpm tsx ecosystem-ci.ts
133201 run-suites
134202 --stack rspack
0 commit comments