Browse Source

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 <noreply@anthropic.com>

* 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) <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
pull/11637/head
elrrrrrrr 6 months ago
committed by GitHub
parent
commit
aa75a27b49
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 8
      .github/workflows/ci.yml
  2. 6
      .github/workflows/coverage.yml
  3. 11
      .github/workflows/deploy.yml
  4. 6
      .github/workflows/preview-build.yml
  5. 2
      jest.config.ts
  6. 6
      src/pages/user/login/__snapshots__/login.test.tsx.snap

8
.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

6
.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

11
.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

6
.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

2
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<any> => {
const config = await configUmiAlias({

6
src/pages/user/login/__snapshots__/login.test.tsx.snap

@ -365,9 +365,6 @@ exports[`Login Page should login success 1`] = `
id="autoLogin"
type="checkbox"
/>
<span
class="ant-checkbox-inner"
/>
</span>
<span
class="ant-checkbox-label"
@ -908,9 +905,6 @@ exports[`Login Page should show login form 1`] = `
id="autoLogin"
type="checkbox"
/>
<span
class="ant-checkbox-inner"
/>
</span>
<span
class="ant-checkbox-label"

Loading…
Cancel
Save