Skip to content

chore(ci): support ecosystem-ci use different npm in different repo #10962

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Jul 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 26 additions & 3 deletions .github/workflows/ecosystem-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,11 @@ jobs:
uses: ./.github/workflows/reusable-build.yml
with:
target: x86_64-unknown-linux-gnu
runner: ${{ needs.get-runner-labels.outputs.LINUX_RUNNER_LABELS }}
runner: ${{ vars.LINUX_SELF_HOSTED_RUNNER_LABELS || '"ubuntu-22.04"' }}
ref: ${{ github.event_name == 'workflow_dispatch' && format('refs/pull/{0}/head', inputs.pr) || github.sha }}
test: false
bench: false
prefer_docker: false

create-comment:
if: github.repository == 'web-infra-dev/rspack'
Expand Down Expand Up @@ -181,19 +182,41 @@ jobs:
cd rspack-ecosystem-ci
pnpm i --frozen-lockfile

pnpm verdaccio --config verdaccio.yaml&
printf '\n//localhost:4873/:_authToken="this-is-a-fake-token"\n' >> ~/.npmrc

mkdir -p ./workspace
ln -s $RSPACK_DIR ./workspace/rspack

cd workspace/rspack
pnpm --filter @rspack/binding... \
--filter @rspack/binding-darwin-arm64... \
--filter @rspack/core... \
--filter @rspack/dev-server... \
--filter @rspack/test-tools... \
--filter @rspack/tracing... \
exec sh -c 'jq ".publishConfig.provenance = false" package.json > package.json.tmp && mv package.json.tmp package.json'

pnpm publish --no-git-checks --provenance=false --access public --registry=http://localhost:4873 \
--filter @rspack/binding... \
--filter @rspack/binding-darwin-arm64... \
--filter @rspack/core... \
--filter @rspack/dev-server... \
--filter @rspack/test-tools... \
--filter @rspack/tracing...

cd ../..
pwd
SUITE='${{ matrix.suite }}'
SUITE_REF='${{ inputs.suiteRef || '-' }}'
CONCLUSION='success'
if [[ "$SUITE_REF" != "-" ]]; then
# run test suite with suiteRef
pnpm tsx ecosystem-ci.ts run-suites --suite-commit "$SUITE_REF" "$SUITE" || CONCLUSION='failure'
NPM_CONFIG_REGISTRY=http://localhost:4873 pnpm tsx ecosystem-ci.ts run-suites --suite-commit "$SUITE_REF" "$SUITE" || CONCLUSION='failure'
echo "finish run $SUITE with $SUITE_REF"
else
# run test suite
pnpm tsx ecosystem-ci.ts run-suites "$SUITE" || CONCLUSION='failure'
NPM_CONFIG_REGISTRY=http://localhost:4873 pnpm tsx ecosystem-ci.ts run-suites "$SUITE" || CONCLUSION='failure'
echo "finish run $SUITE"
fi
echo "{\"conclusion\":\"$CONCLUSION\"}" >> "$RSPACK_DIR/$SUITE.json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ module.exports = {
expect(module.size()).toBe(5);
expect(moduleGraph.isAsync(module)).toBe(false);
expect(chunkGraph.getModuleChunks(module).length).toBe(1);
expect(Array.from(chunkGraph.getModuleChunksIterable(module)).length).toBe(1);
expect(
Array.from(chunkGraph.getModuleChunksIterable(module)).length
).toBe(1);
return true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/rspack/src/util/bindingVersionCheck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Help:
`;
}

return `Unmatched version @rspack/core@${coreVersion} and @rspack/binding.
return `Unmatched version @rspack/core@${coreVersion} and @rspack/binding@${expectedCoreVersion}.

Help:
Please ensure the version of @rspack/binding and @rspack/core is the same.
Expand Down
Loading