fix(ci): clean e2e smoke workspace artifacts
All checks were successful
Code Review / ai-code-review (push) Successful in 33s
All checks were successful
Code Review / ai-code-review (push) Successful in 33s
This commit is contained in:
@@ -1046,6 +1046,20 @@ jobs:
|
||||
# 首席架構師 Review I4 + 2026-04-05 Claude Code cache優化:
|
||||
# playwright.config.ts import @playwright/test — 必須先安裝 pnpm node_modules
|
||||
# pnpm store 持久化到 /opt/pnpm-store,pnpm-lock.yaml hash 未變則 --prefer-offline
|
||||
cleanup_smoke_workspace_artifacts() {
|
||||
# 2026-05-19 Codex: pnpm creates a symlink-heavy node_modules tree
|
||||
# inside the bind-mounted checkout. Remove it before act-runner's
|
||||
# post-job cleanup so successful smoke jobs do not end with
|
||||
# errSymlink cleanup noise.
|
||||
rm -rf /workspace/node_modules \
|
||||
/workspace/apps/web/node_modules \
|
||||
/workspace/apps/web/tests/e2e/.auth \
|
||||
/workspace/apps/web/test-results \
|
||||
/workspace/apps/web/playwright-report \
|
||||
2>/dev/null || true
|
||||
}
|
||||
trap cleanup_smoke_workspace_artifacts EXIT
|
||||
|
||||
PNPM_STORE=/opt/pnpm-store
|
||||
PNPM_HASH_FILE=/opt/pnpm-store/.lock_hash
|
||||
CURRENT_PNPM_HASH=$(md5sum pnpm-lock.yaml | awk '{print $1}')
|
||||
@@ -1085,9 +1099,9 @@ jobs:
|
||||
tail -20 /tmp/playwright-install-deps.log
|
||||
fi
|
||||
# 對已部署的生產環境跑 smoke test
|
||||
npx playwright test tests/e2e/smoke.spec.ts --reporter=line \
|
||||
&& echo "smoke_status=pass" >> $GITHUB_OUTPUT \
|
||||
|| echo "smoke_status=fail" >> $GITHUB_OUTPUT
|
||||
SMOKE_STATUS=pass
|
||||
npx playwright test tests/e2e/smoke.spec.ts --reporter=line || SMOKE_STATUS=fail
|
||||
echo "smoke_status=${SMOKE_STATUS}" >> $GITHUB_OUTPUT
|
||||
CI_SCRIPT
|
||||
SMOKE_OUTPUT="$PWD/.awoooi-smoke-output"
|
||||
rm -f "$SMOKE_OUTPUT"
|
||||
|
||||
Reference in New Issue
Block a user