mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-01 19:42:03 +00:00
ci: fast-fail regression matrix + preflight gate before expensive jobs
Don't burn 60+ runner-minutes on regression shards, perf shards, preview-parity, Windows renders, or catalog-preview renders when the PR is already failing lint or format. - regression: matrix fail-fast: false → true (first failing shard cancels the rest), plus a new preflight (lint + format:check) job gating regression-shards. - player-perf: matrix fail-fast → true, plus preflight gate. - preview-regression, windows-render, catalog-previews: preflight gate added; heavy jobs now needs: [..., preflight]. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -17,8 +17,23 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
preflight:
|
||||
name: Preflight (lint + format)
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
|
||||
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
||||
with:
|
||||
node-version: 22
|
||||
- run: bun install --frozen-lockfile
|
||||
- run: bun run lint
|
||||
- run: bun run format:check
|
||||
|
||||
render-previews:
|
||||
name: Render catalog previews
|
||||
needs: preflight
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
|
||||
@@ -37,14 +37,30 @@ jobs:
|
||||
- "bun.lock"
|
||||
- ".github/workflows/player-perf.yml"
|
||||
|
||||
preflight:
|
||||
name: Preflight (lint + format)
|
||||
needs: changes
|
||||
if: needs.changes.outputs.perf == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
|
||||
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
||||
with:
|
||||
node-version: 22
|
||||
- run: bun install --frozen-lockfile
|
||||
- run: bun run lint
|
||||
- run: bun run format:check
|
||||
|
||||
perf-shards:
|
||||
name: "Perf: ${{ matrix.shard }}"
|
||||
needs: changes
|
||||
needs: [changes, preflight]
|
||||
if: needs.changes.outputs.perf == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
strategy:
|
||||
fail-fast: false
|
||||
fail-fast: true
|
||||
matrix:
|
||||
include:
|
||||
- shard: load
|
||||
|
||||
@@ -41,9 +41,25 @@ jobs:
|
||||
- "bun.lock"
|
||||
- ".github/workflows/preview-regression.yml"
|
||||
|
||||
preflight:
|
||||
name: Preflight (lint + format)
|
||||
needs: changes
|
||||
if: needs.changes.outputs.preview == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
|
||||
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
||||
with:
|
||||
node-version: 22
|
||||
- run: bun install --frozen-lockfile
|
||||
- run: bun run lint
|
||||
- run: bun run format:check
|
||||
|
||||
preview-parity:
|
||||
name: Preview parity
|
||||
needs: changes
|
||||
needs: [changes, preflight]
|
||||
if: needs.changes.outputs.preview == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
|
||||
@@ -34,13 +34,29 @@ jobs:
|
||||
- "packages/engine/**"
|
||||
- "Dockerfile*"
|
||||
|
||||
regression-shards:
|
||||
preflight:
|
||||
name: Preflight (lint + format)
|
||||
needs: changes
|
||||
if: needs.changes.outputs.code == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
|
||||
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
||||
with:
|
||||
node-version: 22
|
||||
- run: bun install --frozen-lockfile
|
||||
- run: bun run lint
|
||||
- run: bun run format:check
|
||||
|
||||
regression-shards:
|
||||
needs: [changes, preflight]
|
||||
if: needs.changes.outputs.code == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 60
|
||||
strategy:
|
||||
fail-fast: false
|
||||
fail-fast: true
|
||||
matrix:
|
||||
# Shards are bin-packed by measured per-test duration (LPT heuristic on
|
||||
# CI run 25893372795) so each row carries ~15-16 min of work. When a
|
||||
|
||||
@@ -57,9 +57,27 @@ jobs:
|
||||
- "bun.lock"
|
||||
- ".github/workflows/windows-render.yml"
|
||||
|
||||
preflight:
|
||||
name: Preflight (lint + format)
|
||||
needs: changes
|
||||
if: needs.changes.outputs.code == 'true' || github.event_name == 'workflow_dispatch'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
with:
|
||||
ref: ${{ github.event.inputs.ref }}
|
||||
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
|
||||
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
||||
with:
|
||||
node-version: 22
|
||||
- run: bun install --frozen-lockfile
|
||||
- run: bun run lint
|
||||
- run: bun run format:check
|
||||
|
||||
render-windows:
|
||||
name: Render on windows-latest
|
||||
needs: changes
|
||||
needs: [changes, preflight]
|
||||
if: needs.changes.outputs.code == 'true' || github.event_name == 'workflow_dispatch'
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 30
|
||||
@@ -344,7 +362,7 @@ jobs:
|
||||
# -------------------------------------------------------------------
|
||||
test-windows:
|
||||
name: Tests on windows-latest
|
||||
needs: changes
|
||||
needs: [changes, preflight]
|
||||
if: needs.changes.outputs.code == 'true' || github.event_name == 'workflow_dispatch'
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 20
|
||||
|
||||
Reference in New Issue
Block a user