XGBoost Testing #35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: XGBoost Testing | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| test-xgboost: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r Dependencies/requirements.txt | |
| pip install papermill jupyter nbformat | |
| - name: Verify notebook exists | |
| run: | | |
| if [ -f "3_OUTPUT/3_xg_boost/XGBoost_Testing.ipynb" ]; then | |
| echo "✅ Notebook found" | |
| else | |
| echo "❌ Notebook not found" | |
| exit 1 | |
| fi | |
| - name: Execute XGBoost_Testing.ipynb | |
| run: | | |
| export PYTHONPATH="$PWD:$PWD/Build:$PYTHONPATH" | |
| papermill \ | |
| 3_OUTPUT/3_xg_boost/XGBoost_Testing.ipynb \ | |
| 3_OUTPUT/3_xg_boost/XGBoost_Testing_output.ipynb \ | |
| --kernel python3 \ | |
| --execution-timeout 1800 \ | |
| --cwd "$PWD" | |
| continue-on-error: false | |
| - name: Extract results | |
| if: always() | |
| run: | | |
| export PYTHONPATH="$PWD:$PWD/Build:$PYTHONPATH" | |
| python Build/extract_results.py || echo "Extraction completed" | |
| - name: Upload executed notebook | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: xgboost-testing-results | |
| path: | | |
| 3_OUTPUT/3_xg_boost/XGBoost_Testing_output.ipynb | |
| Build/model_results.log | |
| retention-days: 30 | |
| - name: Verify execution | |
| run: | | |
| export PYTHONPATH="$PWD:$PWD/Build:$PYTHONPATH" | |
| python Build/test_notebook_execution.py || echo "Verification completed" |