-
-
Notifications
You must be signed in to change notification settings - Fork 736
chore: add rsdoctor diff action #12256
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
base: chore/diff-v2
Are you sure you want to change the base?
Changes from 1 commit
4cbf2b1
4dd19be
10c9699
7caec74
f8aab99
9719312
6f2e3f6
5661b90
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -141,3 +141,22 @@ jobs: | |||||
| NODE_NO_WARNINGS: 1 | ||||||
| WASM: 1 | ||||||
| run: pnpm run test:ci | ||||||
|
|
||||||
| ### Rsdoctor Diff Action | ||||||
| - name: Clone rspack-sourcemap-demo | ||||||
| run: git clone [email protected]:yifancong/rspack-diff-minimal.git | ||||||
|
|
||||||
| - name: Install dependencies | ||||||
| working-directory: rspack-diff-minimal | ||||||
| run: pnpm i | ||||||
|
|
||||||
| - name: Build project | ||||||
| working-directory: rspack-diff-minimal | ||||||
| run: pnpm run build | ||||||
|
|
||||||
| - name: Report Compressed Size | ||||||
| uses: web-infra-dev/rsdoctor-action@main | ||||||
|
||||||
| uses: web-infra-dev/rsdoctor-action@main | |
| uses: web-infra-dev/rsdoctor-action@v1.0.0 |
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The target branch "chore/diff-v2" is hardcoded, which means this workflow will always compare against the same branch regardless of the actual PR base branch. This will produce incorrect comparisons for PRs targeting different branches.
Consider making this configurable or using a dynamic value like ${{ github.base_ref }} to automatically use the PR's target branch.
| target_branch: "chore/diff-v2" | |
| target_branch: ${{ github.base_ref }} |
Outdated
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These rsdoctor diff steps run unconditionally for all test matrix combinations (different Node versions and targets). This means the same rsdoctor analysis will be executed multiple times unnecessarily, wasting CI resources and potentially causing conflicts.
Add a condition to run only once, for example:
- name: Clone rspack-diff-minimal
if: ${{ matrix.node == '20' && inputs.target == 'x86_64-unknown-linux-gnu' }}
run: git clone https://github.com/yifancong/rspack-diff-minimal.gitApply the same condition to all rsdoctor-related steps (lines 149-162).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The git clone command uses SSH protocol (
[email protected]:), which will fail in GitHub Actions without SSH key configuration. There's no SSH key setup in the workflow, so this step will fail with an authentication error.Replace with HTTPS protocol: