From aa75a27b493ecdd066426cbd424f53fe4eb6a251 Mon Sep 17 00:00:00 2001 From: elrrrrrrr Date: Tue, 31 Mar 2026 15:19:21 +0800 Subject: [PATCH] ci: migrate from bun to utoo for dependency installation (#11639) * ci: migrate from bun to utoo for dependency installation Co-Authored-By: Claude Sonnet 4.6 * fix: update jest config for ESM compatibility and refresh login snapshots Add .js extension to @umijs/max/test import for Node 25 + Jest 30 ESM resolution, and update login page snapshots to match latest antd Checkbox DOM structure. Co-Authored-By: Claude Opus 4.6 (1M context) --------- Co-authored-by: Claude Sonnet 4.6 --- .github/workflows/ci.yml | 8 ++++---- .github/workflows/coverage.yml | 6 +++--- .github/workflows/deploy.yml | 11 +++-------- .github/workflows/preview-build.yml | 6 +++--- jest.config.ts | 2 +- .../user/login/__snapshots__/login.test.tsx.snap | 6 ------ 6 files changed, 14 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a2afec3a..5787bd14 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,10 +19,10 @@ jobs: with: node-version: ${{ matrix.node_version }} - run: echo ${{github.ref}} - - uses: oven-sh/setup-bun@v2 - - run: bun install - - run: bun run lint - - run: bun run build + - uses: utooland/setup-utoo@v1 + - run: ut + - run: ut lint + - run: ut build env: CI: true PROGRESS: none diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index ae99596b..c4302e6b 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -15,7 +15,7 @@ jobs: with: node-version: 20 - run: echo ${{github.ref}} - - uses: oven-sh/setup-bun@v2 - - run: bun install - - run: bun run test:coverage + - uses: utooland/setup-utoo@v1 + - run: ut + - run: ut test:coverage - uses: codecov/codecov-action@v5 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a113cf9a..737132f8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,14 +13,9 @@ jobs: - name: Checkout code uses: actions/checkout@v6 - - name: Install Bun - uses: oven-sh/setup-bun@v2 - - - name: Install dependencies with Bun - run: bun install - - - name: Build project - run: bun run build + - uses: utooland/setup-utoo@v1 + - run: ut + - run: ut build - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v4 diff --git a/.github/workflows/preview-build.yml b/.github/workflows/preview-build.yml index 6d7b326d..cecc606f 100644 --- a/.github/workflows/preview-build.yml +++ b/.github/workflows/preview-build.yml @@ -16,9 +16,9 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} - - uses: oven-sh/setup-bun@v2 - - run: bun install - - run: bun run build + - uses: utooland/setup-utoo@v1 + - run: ut + - run: ut build - name: upload dist artifact uses: actions/upload-artifact@v4 diff --git a/jest.config.ts b/jest.config.ts index 99051c41..230bef7d 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -1,4 +1,4 @@ -import { configUmiAlias, createConfig } from '@umijs/max/test'; +import { configUmiAlias, createConfig } from '@umijs/max/test.js'; export default async (): Promise => { const config = await configUmiAlias({ diff --git a/src/pages/user/login/__snapshots__/login.test.tsx.snap b/src/pages/user/login/__snapshots__/login.test.tsx.snap index b2185b21..8cc10ba8 100644 --- a/src/pages/user/login/__snapshots__/login.test.tsx.snap +++ b/src/pages/user/login/__snapshots__/login.test.tsx.snap @@ -365,9 +365,6 @@ exports[`Login Page should login success 1`] = ` id="autoLogin" type="checkbox" /> - -