Skip to content

Commit bc3db21

Browse files
elrrrrrrrclaude
andcommitted
ci: use ut CI config as baseline (no source changes)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 36d126b commit bc3db21

File tree

2 files changed

+46
-36
lines changed

2 files changed

+46
-36
lines changed

.github/workflows/ci.yml

Lines changed: 41 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# CI workflow for egg monorepo
12
name: CI
23

34
on:
@@ -27,35 +28,31 @@ jobs:
2728
- name: Checkout repository
2829
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
2930

30-
- name: Install pnpm
31-
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
31+
- name: Setup utoo
32+
uses: utooland/setup-utoo@3a51006d0b66afcc32d1b9177a4b200b74f4a8cb # main
3233

3334
- name: Set up Node.js
3435
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
3536
with:
3637
node-version: '24'
37-
cache: 'pnpm'
3838

3939
- name: Install dependencies
40-
run: pnpm install --frozen-lockfile
40+
run: ut install --from pnpm
4141

4242
- name: Run lint
43-
run: pnpm run lint
44-
45-
- name: Check dedupe
46-
run: pnpm dedupe --check
43+
run: ut run lint
4744

4845
- name: Run typecheck
49-
run: pnpm run typecheck
46+
run: ut run typecheck
5047

5148
- name: Run format check
52-
run: pnpm run fmtcheck
49+
run: ut run fmtcheck
5350

5451
- name: Run build
55-
run: pnpm run build
52+
run: ut run build
5653

5754
- name: Run site build
58-
run: pnpm run site:build
55+
run: ut run site:build
5956

6057
test:
6158
strategy:
@@ -154,25 +151,41 @@ jobs:
154151
# & mysqladmin -u root password root
155152
& mysql -uroot -e "CREATE DATABASE IF NOT EXISTS test;"
156153
157-
- name: Install pnpm
158-
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
154+
- name: Setup utoo
155+
uses: utooland/setup-utoo@3a51006d0b66afcc32d1b9177a4b200b74f4a8cb # main
159156

160157
- name: Set up Node.js
161158
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
162159
with:
163160
node-version: ${{ matrix.node }}
164-
cache: 'pnpm'
165161

166162
- name: Install dependencies
167-
run: pnpm install --frozen-lockfile
163+
run: ut install --from pnpm
164+
165+
- name: Link workspace packages
166+
if: ${{ matrix.os != 'windows-latest' }}
167+
shell: bash
168+
run: |
169+
# ut flat-hoisting may copy workspace packages instead of symlinking;
170+
# force proper symlinks so cross-workspace ESM imports resolve to source.
171+
for pkg in tegg/core/*/package.json tegg/plugin/*/package.json tegg/standalone/*/package.json; do
172+
[ -f "$pkg" ] || continue
173+
name=$(node -e "console.log(require('./$pkg').name)")
174+
dir=$(dirname "$pkg")
175+
link="node_modules/$name"
176+
rm -rf "$link"
177+
mkdir -p "$(dirname "$link")"
178+
ln -sf "../../$dir" "$link"
179+
echo "$name -> $dir"
180+
done
168181
169182
- name: Run tests
170-
run: pnpm run ci
183+
run: ut run ci
171184

172185
- name: Run example tests
173186
if: ${{ matrix.os != 'windows-latest' }}
174187
run: |
175-
pnpm run example:test:all
188+
ut run example:test:all
176189
177190
- name: Code Coverage
178191
# skip on windows, it will hangup on codecov
@@ -199,22 +212,21 @@ jobs:
199212
- name: Checkout repository
200213
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
201214

202-
- name: Install pnpm
203-
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
215+
- name: Setup utoo
216+
uses: utooland/setup-utoo@3a51006d0b66afcc32d1b9177a4b200b74f4a8cb # main
204217

205218
- name: Set up Node.js
206219
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
207220
with:
208221
node-version: ${{ matrix.node }}
209-
cache: 'pnpm'
210222

211223
- name: Install dependencies
212-
run: pnpm install --frozen-lockfile
224+
run: ut install --from pnpm
213225

214226
- name: Run tests
215227
run: |
216-
pnpm build --workspace ./tools/egg-bin
217-
pnpm run --filter ./tools/egg-bin ci
228+
ut run build
229+
ut run ci --workspace @eggjs/bin
218230
219231
- name: Code Coverage
220232
# skip on windows, it will hangup on codecov https://github.com/codecov/codecov-action/issues/1787
@@ -241,22 +253,21 @@ jobs:
241253
- name: Checkout repository
242254
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
243255

244-
- name: Install pnpm
245-
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
256+
- name: Setup utoo
257+
uses: utooland/setup-utoo@3a51006d0b66afcc32d1b9177a4b200b74f4a8cb # main
246258

247259
- name: Set up Node.js
248260
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
249261
with:
250262
node-version: ${{ matrix.node }}
251-
cache: 'pnpm'
252263

253264
- name: Install dependencies
254-
run: pnpm install --frozen-lockfile
265+
run: ut install --from pnpm
255266

256267
- name: Run tests
257268
run: |
258-
pnpm build
259-
pnpm run --filter=./tools/scripts ci
269+
ut run build
270+
ut run ci --workspace tools/scripts
260271
261272
- name: Code Coverage
262273
if: ${{ matrix.os != 'windows-latest' }}

.github/workflows/e2e-test.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,24 +141,23 @@ jobs:
141141
with:
142142
ecosystem-ci-project: ${{ matrix.project.name }}
143143

144-
- name: Install pnpm
145-
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
144+
- name: Setup utoo
145+
uses: utooland/setup-utoo@3a51006d0b66afcc32d1b9177a4b200b74f4a8cb # main
146146

147147
- name: Set up Node.js
148148
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
149149
with:
150150
node-version: ${{ matrix.project.node-version }}
151-
cache: 'pnpm'
152151

153152
- name: Install dependencies
154-
run: pnpm install --frozen-lockfile
153+
run: ut install --from pnpm
155154

156155
- name: Build all packages
157-
run: pnpm build
156+
run: ut run build
158157

159158
- name: Pack packages into tgz
160159
run: |
161-
pnpm -r pack
160+
node ecosystem-ci/pack-all.mjs
162161
163162
- name: Override dependencies from tgz in ${{ matrix.project.name }}
164163
working-directory: ecosystem-ci/${{ matrix.project.name }}

0 commit comments

Comments
 (0)