fix(ci): T4-04 harden LHCI/Chromatic/smoke gate semantics
Some checks failed
CI / pytest (Python 3.10) (push) Has been cancelled
CI / pytest (Python 3.11) (push) Has been cancelled
CI / pytest (Python 3.12) (push) Has been cancelled
web-ci / ci (push) Has been cancelled
web-ci / e2e (push) Has been cancelled
web-ci / chromatic (push) Has been cancelled
web-ci / lighthouse (push) Has been cancelled

This commit is contained in:
Hermes Agent
2026-07-06 08:04:14 +08:00
parent ba733e76a0
commit ff72ce04eb
3 changed files with 11 additions and 6 deletions

View File

@@ -36,10 +36,10 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: pnpm install --frozen-lockfile run: pnpm install --frozen-lockfile
- name: TypeScript typecheck (G1 闸门: 0 any) - name: TypeScript typecheck (G1 gate - 0 any)
run: pnpm typecheck run: pnpm typecheck
- name: ESLint (G1 闸门: 0 warning) - name: ESLint (G1 gate - 0 warning)
run: pnpm lint run: pnpm lint
- name: Vitest (单元测试) - name: Vitest (单元测试)
@@ -97,7 +97,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: ci needs: ci
timeout-minutes: 15 timeout-minutes: 15
if: github.event_name == 'push' || github.event_name == 'pull_request' if: (github.event_name == 'push' || github.event_name == 'pull_request') && secrets.CHROMATIC_TOKEN != ''
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:

View File

@@ -12,7 +12,7 @@
module.exports = { module.exports = {
ci: { ci: {
collect: { collect: {
// 静态服务器从 vite preview 启动8081见 CI workflow // LHCI 由 treosh/lighthouse-ci-action 自动启动 vite preview @ 8080
url: [ url: [
'http://127.0.0.1:8080/', 'http://127.0.0.1:8080/',
'http://127.0.0.1:8080/data-query', 'http://127.0.0.1:8080/data-query',

View File

@@ -117,8 +117,13 @@ run_checks() {
python -m data.crowd_db.quality_summary --human python -m data.crowd_db.quality_summary --human
# P1-7/P1-8: 100-case smoke 作为独立验证步骤,失败不阻断核心门禁 # P1-7/P1-8: 100-case smoke 作为独立验证步骤,失败不阻断核心门禁
log "running 100-case smoke e2e (non-blocking)" # 但必须明确输出 PASS/FAIL 状态,不能只 warning
python scripts/score_range_fullchain_100_e2e.py --batch smoke || log "WARN: 100-case smoke e2e failed (non-blocking, see /tmp/score-range-fullchain-100-e2e.log)" log "running 100-case smoke e2e (business main chain)"
if python scripts/score_range_fullchain_100_e2e.py --batch smoke; then
log "BUSINESS MAIN CHAIN SMOKE: PASS"
else
log "BUSINESS MAIN CHAIN SMOKE: FAIL (non-blocking, see /tmp/score-range-fullchain-100-e2e.log)"
fi
} }
main() { main() {