ci(examples): run examples / testing from built lib/js

This commit is contained in:
imccyu
2026-07-17 15:42:35 +08:00
parent 8d5f08892b
commit 5ed531acba
35 changed files with 679 additions and 183 deletions

View File

@@ -110,9 +110,14 @@ jobs:
fi
echo "DEEPSEEK_API_KEY present."
# The e2e suites boot the example bins in `lib` mode (DSH_EXAMPLE_MODE=lib):
# the built artifact under plain Node, resolving plugins through real package
# exports — the shape a real consumer runs. That requires a prior build.
- name: Build (lib for the e2e example bins)
run: pnpm run build
# Real-API end-to-end tests only. The keyless gates (lint/typecheck/
# coverage/snapshot/build/etc.) already run in ci.yml on every push/PR;
# no need to repeat them or build first (tests run unbuilt via tsx).
# coverage/snapshot/etc.) already run in ci.yml on every push/PR.
# DEEPSEEK_BASE_URL is pinned to the external API; the secret is scoped to
# this step (and preflight) only — never exposed to checkout/setup/install.
- name: E2E tests (real DeepSeek API)
@@ -120,4 +125,5 @@ jobs:
DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY_EXTERNAL }}
DEEPSEEK_BASE_URL: https://api.deepseek.com
DSH_E2E_MAX_WORKERS: 14
DSH_EXAMPLE_MODE: lib
run: pnpm run test:e2e