From 7debb35775ad46cff95f59dae5ebfca6d81e22c3 Mon Sep 17 00:00:00 2001 From: fengmk2 Date: Sat, 7 Feb 2026 21:50:14 +0800 Subject: [PATCH] ci: merge cli-self-update into cli-e2e-test job Eliminates 3 redundant runners (ubuntu, mac, windows) that duplicated the entire setup/build pipeline just to run self-update tests. Self-update tests now run as additional steps at the end of the cli-e2e-test job, reusing the already-built CLI. --- .github/workflows/ci.yml | 63 ++-------------------------------------- 1 file changed, 3 insertions(+), 60 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0559954d02..f94f5eb04d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -361,63 +361,7 @@ jobs: RUST_BACKTRACE=1 pnpm test git diff --exit-code - cli-self-update: - name: CLI self-update test - needs: - - download-previous-rolldown-binaries - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-latest - - os: namespace-profile-mac-default - - os: windows-latest - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - - uses: ./.github/actions/clone - - - name: Configure Git for access to vite-task - run: git config --global url."https://x-access-token:${{ secrets.VITE_TASK_TOKEN }}@github.com/".insteadOf "ssh://git@github.com/" - - - run: | - brew install rustup - rustup install stable - echo "PATH=/opt/homebrew/opt/rustup/bin:$PATH" >> $GITHUB_ENV - if: ${{ matrix.os == 'namespace-profile-mac-default' }} - - - uses: oxc-project/setup-rust@d286d43bc1f606abbd98096666ff8be68c8d5f57 # v1.0.0 - with: - save-cache: ${{ github.ref_name == 'main' }} - cache-key: cli-self-update - - - uses: oxc-project/setup-node@fdbf0dfd334c4e6d56ceeb77d91c76339c2a0885 # v1.0.4 - - - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 - with: - name: rolldown-binaries - path: ./rolldown/packages/rolldown/src - merge-multiple: true - - - name: Build with upstream - uses: ./.github/actions/build-upstream - with: - target: ${{ matrix.os == 'ubuntu-latest' && 'x86_64-unknown-linux-gnu' || matrix.os == 'windows-latest' && 'x86_64-pc-windows-msvc' || 'aarch64-apple-darwin' }} - - - name: Build CLI - run: | - pnpm bootstrap-cli:ci - if [[ "$RUNNER_OS" == "Windows" ]]; then - echo "$USERPROFILE\.vite-plus\bin" >> $GITHUB_PATH - else - echo "$HOME/.vite-plus/bin" >> $GITHUB_PATH - fi - - - name: Verify CLI installation - run: | - which vp - vp --version - + # Self-update tests (merged from separate job to avoid duplicate build) - name: Test self-update (bash) shell: bash run: | @@ -464,7 +408,7 @@ jobs: fi - name: Test self-update (powershell) - if: matrix.os == 'windows-latest' + if: ${{ matrix.os == 'windows-latest' }} shell: pwsh run: | Get-ChildItem "$env:USERPROFILE\.vite-plus\" @@ -512,7 +456,7 @@ jobs: } - name: Test self-update (cmd) - if: matrix.os == 'windows-latest' + if: ${{ matrix.os == 'windows-latest' }} shell: cmd run: | REM Save initial (dev build) version @@ -631,7 +575,6 @@ jobs: - lint - run - cli-e2e-test - - cli-self-update steps: - run: exit 1 # Thank you, next https://github.com/vercel/next.js/blob/canary/.github/workflows/build_and_test.yml#L379