Skip to content

Commit 69f2fa3

Browse files
authored
ci: always run claude code on upgrade deps pipeline (#647)
<!-- CURSOR_SUMMARY --> > [!NOTE] > **Medium Risk** > Changes CI behavior to always invoke a third-party `claude-code-action`, which can increase runtime/cost and affects automated remediation flow if the build succeeds/fails unexpectedly. > > **Overview** > The `upgrade-deps` workflow now **always runs** `anthropics/claude-code-action` instead of only when `build-upstream` fails, and updates the prompt to conditionally investigate/fix failures and clarify that changes should not be committed in that step. > > The `build-upstream` composite action adds an optional `print-after-build` input, and the workflow enables it to print `vp` command help output after the build for easier debugging/verification. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 7fe0dc7. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 0e59f58 commit 69f2fa3

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

.github/actions/build-upstream/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ inputs:
44
target:
55
description: 'The target platform'
66
required: true
7+
print-after-build:
8+
description: 'Print the output after the build'
9+
required: false
10+
default: 'false'
711

812
runs:
913
using: 'composite'

.github/workflows/upgrade-deps.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,13 @@ jobs:
6262
RELEASE_BUILD: 'true'
6363

6464
- uses: anthropics/claude-code-action@a017b830c03e23789b11fb69ed571ea61c12e45c # v1.0.0
65-
if: steps.build-upstream.outcome == 'failure'
6665
env:
6766
RELEASE_BUILD: 'true'
6867
with:
6968
claude_code_oauth_token: ${{ secrets.ANTHROPIC_API_KEY }}
7069
github_token: ${{ secrets.GITHUB_TOKEN }}
7170
prompt: |
72-
Check why the build-upstream steps failed and fix them.
71+
Check if the build-upstream steps failed and fix them.
7372
### Background
7473
- The build-upstream steps are at ./.github/actions/build-upstream/action.yml
7574
- The deps upgrade script is at ./.github/scripts/upgrade-deps.mjs
@@ -79,10 +78,12 @@ jobs:
7978
- We are aiming to upgrade all dependencies to the latest versions in this workflow, so don't downgrade any dependencies.
8079
- Check `.claude/agents/cargo-workspace-merger.md` if rolldown hash is changed.
8180
- Run the steps in `build-upstream` action.yml after your fixing. If no errors are found, you can safe to exit.
82-
- Your final step is to run `just build` to ensure all builds are successful.
81+
- Install global CLI after the build-upstream steps are successful, by running the following commands:
82+
- `pnpm bootstrap-cli:ci`
83+
- `echo "$HOME/.vite-plus/bin" >> $GITHUB_PATH`
8384
- Run `pnpm run lint` to check if there are any issues after the build, if has, deep investigate it and fix it. You need to run `just build` before you can run `pnpm run lint`.
8485
- Run `pnpm run test` after `just build` to ensure all tests are successful.
85-
- The snapshot tests in `pnpm run test` are always successful, you need to check the updated snapshot to see if there is anything wrong after our deps upgrade.
86+
- The snapshot tests in `pnpm run test` are always successful, you need to check the snapshot diffs in git to see if there is anything wrong after our deps upgrade.
8687
- If deps in our `Cargo.toml` need to be upgraded, you can refer to the `./.claude/agents/cargo-workspace-merger.md`
8788
- If `Cargo.toml` has been modified, you need to run `cargo shear` to ensure there is nothing wrong with our dependencies.
8889
- Run `cargo check --all-targets --all-features` to ensure everything works fine if any Rust related codes are modified.
@@ -93,8 +94,10 @@ jobs:
9394
vp test -h
9495
vp build -h
9596
vp fmt -h
97+
- Your final step is to run `just build` to ensure all builds are successful.
9698
97-
Help me fix the errors in `build-upstream` steps, no need to commit changes after your fixing.
99+
Help me fix the errors in `build-upstream` steps if exists.
100+
No need to commit changes after your fixing we have a following step to commit all file changes.
98101
claude_args: |
99102
--model opus --allowedTools "Bash,Edit,Replace,NotebookEditCell"
100103
additional_permissions: |

0 commit comments

Comments
 (0)