fix(ci): skip Fresh Install test for fork PRs

Fork PRs have branches that don't exist in harvard-edge/cs249r_book,
so the install script URL is invalid. Skip Fresh Install for fork PRs
and run it only for:
- Direct pushes to dev/main
- PRs from branches within the same repo
This commit is contained in:
Vijay Janapa Reddi
2026-01-26 08:28:49 -05:00
parent 2406cfc307
commit 4815f25d1a

View File

@@ -388,15 +388,18 @@ jobs:
# ===========================================================================
# STAGE 7: FRESH INSTALL - Simulates real student experience
# ===========================================================================
# Note: Skipped for fork PRs because the branch doesn't exist in main repo
stage-7-fresh-install:
name: 📦 Stage 7 · Fresh Install
runs-on: ubuntu-latest
needs: [configure, stage-5-e2e]
# Run on standard/all/release test types, after stage 5 passes
# Skip for fork PRs (branch doesn't exist in main repo for install script)
if: |
always() &&
(needs.configure.outputs.run_e2e == 'true' || needs.configure.outputs.run_release == 'true') &&
(needs.stage-5-e2e.result == 'success' || needs.stage-5-e2e.result == 'skipped')
(needs.stage-5-e2e.result == 'success' || needs.stage-5-e2e.result == 'skipped') &&
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
timeout-minutes: 30
steps: