|
| 1 | +name: E2E Quick Validation |
| 2 | + |
| 3 | +# This workflow runs quick E2E validation on PRs that modify the knowledge-tuning example |
| 4 | +# It only runs non-GPU steps to provide fast feedback |
| 5 | + |
| 6 | +on: |
| 7 | + pull_request: |
| 8 | + branches: [main] |
| 9 | + paths: |
| 10 | + - 'examples/knowledge-tuning/**' |
| 11 | + - 'tests/e2e/**' |
| 12 | + - '.github/workflows/e2e-*.yml' |
| 13 | + |
| 14 | + push: |
| 15 | + branches: [main] |
| 16 | + paths: |
| 17 | + - 'examples/knowledge-tuning/**' |
| 18 | + - 'tests/e2e/**' |
| 19 | + |
| 20 | + workflow_dispatch: |
| 21 | + |
| 22 | +env: |
| 23 | + PYTHON_VERSION: '3.12' |
| 24 | + |
| 25 | +jobs: |
| 26 | + e2e-quick-validation: |
| 27 | + name: E2E Quick Validation |
| 28 | + runs-on: ubuntu-latest |
| 29 | + timeout-minutes: 30 |
| 30 | + |
| 31 | + steps: |
| 32 | + - name: Checkout code |
| 33 | + uses: actions/checkout@v4 |
| 34 | + |
| 35 | + - name: Set up Python |
| 36 | + uses: actions/setup-python@v5 |
| 37 | + with: |
| 38 | + python-version: ${{ env.PYTHON_VERSION }} |
| 39 | + cache: 'pip' |
| 40 | + |
| 41 | + - name: Install dependencies |
| 42 | + run: | |
| 43 | + python -m pip install --upgrade pip |
| 44 | + pip install pytest papermill nbformat nbclient ipykernel jupyter-client |
| 45 | + pip install python-dotenv |
| 46 | +
|
| 47 | + - name: Install Jupyter kernel |
| 48 | + run: | |
| 49 | + python -m ipykernel install --user --name python3 |
| 50 | +
|
| 51 | + - name: Verify E2E test discovery |
| 52 | + run: | |
| 53 | + echo "🔍 Discovering E2E tests..." |
| 54 | + pytest tests/e2e/knowledge_tuning/ --collect-only -q |
| 55 | +
|
| 56 | + - name: Run E2E dry-run |
| 57 | + run: | |
| 58 | + echo "📋 E2E Configuration (dry-run):" |
| 59 | + cd tests/e2e/knowledge_tuning |
| 60 | + python run_e2e.py --dry-run --profile minimal |
| 61 | +
|
| 62 | + - name: Run E2E structure tests |
| 63 | + run: | |
| 64 | + pytest tests/e2e/knowledge_tuning/test_e2e_pipeline.py::TestPipelineResilience -v |
| 65 | +
|
| 66 | + - name: Validate notebook readability |
| 67 | + run: | |
| 68 | + pytest tests/e2e/knowledge_tuning/test_e2e_pipeline.py::TestPipelineResilience::test_all_notebooks_are_readable -v |
| 69 | +
|
| 70 | + - name: Generate summary |
| 71 | + if: always() |
| 72 | + run: | |
| 73 | + echo "## E2E Quick Validation" >> $GITHUB_STEP_SUMMARY |
| 74 | + echo "" >> $GITHUB_STEP_SUMMARY |
| 75 | + echo "✅ E2E test infrastructure validated" >> $GITHUB_STEP_SUMMARY |
| 76 | + echo "" >> $GITHUB_STEP_SUMMARY |
| 77 | + echo "To run full E2E tests, use the **E2E Pipeline Tests** workflow with:" >> $GITHUB_STEP_SUMMARY |
| 78 | + echo "- \`run_full_pipeline: true\`" >> $GITHUB_STEP_SUMMARY |
| 79 | + echo "- \`runner: self-hosted-gpu\` or \`self-hosted-rhoai\`" >> $GITHUB_STEP_SUMMARY |
0 commit comments