mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-03-11 17:49:25 -05:00
chore: swap Stage 6/7 order - Fresh Install before User Journey
This commit is contained in:
108
.github/workflows/tinytorch-validate-dev.yml
vendored
108
.github/workflows/tinytorch-validate-dev.yml
vendored
@@ -419,10 +419,39 @@ jobs:
|
||||
./bin/tito dev test --e2e --ci
|
||||
|
||||
# ===========================================================================
|
||||
# STAGE 6: RELEASE VALIDATION - Destructive full journey (after all stages)
|
||||
# STAGE 6: FRESH INSTALL - Simulates real student experience
|
||||
# ===========================================================================
|
||||
stage-6-release:
|
||||
name: 🎓 Stage 6 · User Journey
|
||||
# Note: Skipped for fork PRs because the branch doesn't exist in main repo
|
||||
stage-6-fresh-install:
|
||||
name: 📦 Stage 6 · 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') &&
|
||||
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
|
||||
timeout-minutes: 30
|
||||
|
||||
steps:
|
||||
- name: Checkout (for test script only)
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
sparse-checkout: |
|
||||
tinytorch/scripts/test-fresh-install.sh
|
||||
|
||||
- name: Run Fresh Install Test (Docker)
|
||||
run: |
|
||||
chmod +x tinytorch/scripts/test-fresh-install.sh
|
||||
./tinytorch/scripts/test-fresh-install.sh --branch ${{ github.ref_name }}
|
||||
|
||||
# ===========================================================================
|
||||
# STAGE 7: USER JOURNEY - Destructive full journey (after all stages)
|
||||
# ===========================================================================
|
||||
stage-7-user-journey:
|
||||
name: 🎓 Stage 7 · User Journey
|
||||
runs-on: ubuntu-latest
|
||||
needs: [configure, stage-5-e2e]
|
||||
# Only run if: release enabled AND all previous stages passed
|
||||
@@ -450,48 +479,19 @@ jobs:
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
|
||||
- name: Run Release Validation
|
||||
- name: Run User Journey Validation
|
||||
run: |
|
||||
echo "🚀 Running DESTRUCTIVE release validation..."
|
||||
echo " This resets all modules and runs the full student journey."
|
||||
echo "🎓 Running user journey validation..."
|
||||
echo " This resets all modules and runs the full user journey."
|
||||
./bin/tito dev test --user-journey --ci
|
||||
|
||||
# ===========================================================================
|
||||
# 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') &&
|
||||
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
|
||||
timeout-minutes: 30
|
||||
|
||||
steps:
|
||||
- name: Checkout (for test script only)
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
sparse-checkout: |
|
||||
tinytorch/scripts/test-fresh-install.sh
|
||||
|
||||
- name: Run Fresh Install Test (Docker)
|
||||
run: |
|
||||
chmod +x tinytorch/scripts/test-fresh-install.sh
|
||||
./tinytorch/scripts/test-fresh-install.sh --branch ${{ github.ref_name }}
|
||||
|
||||
# ===========================================================================
|
||||
# Summary: Collect and report all results
|
||||
# ===========================================================================
|
||||
summary:
|
||||
name: 📊 Summary
|
||||
runs-on: ubuntu-latest
|
||||
needs: [configure, stage-1-inline, stage-2-unit, stage-3-integration, stage-4-cli, stage-5-e2e, stage-6-release, stage-7-fresh-install]
|
||||
needs: [configure, stage-1-inline, stage-2-unit, stage-3-integration, stage-4-cli, stage-5-e2e, stage-6-fresh-install, stage-7-user-journey]
|
||||
if: always()
|
||||
|
||||
steps:
|
||||
@@ -566,26 +566,26 @@ jobs:
|
||||
echo "| 5 | 🌐 E2E Tests | ⏭️ Skipped |" >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
|
||||
# Stage 6: User Journey
|
||||
if [ "${{ needs.configure.outputs.run_release }}" = "true" ]; then
|
||||
case "${{ needs.stage-6-release.result }}" in
|
||||
success) echo "| 6 | 🚀 Release | ✅ Passed |" >> $GITHUB_STEP_SUMMARY ;;
|
||||
failure) echo "| 6 | 🚀 Release | ❌ Failed |" >> $GITHUB_STEP_SUMMARY ;;
|
||||
*) echo "| 6 | 🚀 Release | ⏭️ ${{ needs.stage-6-release.result }} |" >> $GITHUB_STEP_SUMMARY ;;
|
||||
# Stage 6: Fresh Install
|
||||
if [ "${{ needs.configure.outputs.run_e2e }}" = "true" ] || [ "${{ needs.configure.outputs.run_release }}" = "true" ]; then
|
||||
case "${{ needs.stage-6-fresh-install.result }}" in
|
||||
success) echo "| 6 | 📦 Fresh Install | ✅ Passed |" >> $GITHUB_STEP_SUMMARY ;;
|
||||
failure) echo "| 6 | 📦 Fresh Install | ❌ Failed |" >> $GITHUB_STEP_SUMMARY ;;
|
||||
*) echo "| 6 | 📦 Fresh Install | ⏭️ ${{ needs.stage-6-fresh-install.result }} |" >> $GITHUB_STEP_SUMMARY ;;
|
||||
esac
|
||||
else
|
||||
echo "| 6 | 🚀 Release | ⏭️ Skipped |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| 6 | 📦 Fresh Install | ⏭️ Skipped |" >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
|
||||
# Stage 7: Fresh Install
|
||||
if [ "${{ needs.configure.outputs.run_e2e }}" = "true" ] || [ "${{ needs.configure.outputs.run_release }}" = "true" ]; then
|
||||
case "${{ needs.stage-7-fresh-install.result }}" in
|
||||
success) echo "| 7 | 📦 Fresh Install | ✅ Passed |" >> $GITHUB_STEP_SUMMARY ;;
|
||||
failure) echo "| 7 | 📦 Fresh Install | ❌ Failed |" >> $GITHUB_STEP_SUMMARY ;;
|
||||
*) echo "| 7 | 📦 Fresh Install | ⏭️ ${{ needs.stage-7-fresh-install.result }} |" >> $GITHUB_STEP_SUMMARY ;;
|
||||
# Stage 7: User Journey
|
||||
if [ "${{ needs.configure.outputs.run_release }}" = "true" ]; then
|
||||
case "${{ needs.stage-7-user-journey.result }}" in
|
||||
success) echo "| 7 | 🎓 User Journey | ✅ Passed |" >> $GITHUB_STEP_SUMMARY ;;
|
||||
failure) echo "| 7 | 🎓 User Journey | ❌ Failed |" >> $GITHUB_STEP_SUMMARY ;;
|
||||
*) echo "| 7 | 🎓 User Journey | ⏭️ ${{ needs.stage-7-user-journey.result }} |" >> $GITHUB_STEP_SUMMARY ;;
|
||||
esac
|
||||
else
|
||||
echo "| 7 | 📦 Fresh Install | ⏭️ Skipped |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| 7 | 🎓 User Journey | ⏭️ Skipped |" >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
|
||||
- name: Check for failures
|
||||
@@ -613,12 +613,12 @@ jobs:
|
||||
echo "❌ Stage 5 (E2E Tests) failed"
|
||||
FAILED=true
|
||||
fi
|
||||
if [ "${{ needs.configure.outputs.run_release }}" = "true" ] && [ "${{ needs.stage-6-release.result }}" = "failure" ]; then
|
||||
echo "❌ Stage 6 (User Journey) failed"
|
||||
if { [ "${{ needs.configure.outputs.run_e2e }}" = "true" ] || [ "${{ needs.configure.outputs.run_release }}" = "true" ]; } && [ "${{ needs.stage-6-fresh-install.result }}" = "failure" ]; then
|
||||
echo "❌ Stage 6 (Fresh Install) failed"
|
||||
FAILED=true
|
||||
fi
|
||||
if { [ "${{ needs.configure.outputs.run_e2e }}" = "true" ] || [ "${{ needs.configure.outputs.run_release }}" = "true" ]; } && [ "${{ needs.stage-7-fresh-install.result }}" = "failure" ]; then
|
||||
echo "❌ Stage 7 (Fresh Install) failed"
|
||||
if [ "${{ needs.configure.outputs.run_release }}" = "true" ] && [ "${{ needs.stage-7-user-journey.result }}" = "failure" ]; then
|
||||
echo "❌ Stage 7 (User Journey) failed"
|
||||
FAILED=true
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user