Skip to content

PENS DOWN

PENS DOWN #56

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
with:
lfs: false
- 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 3600 \
--cwd "$PWD" || echo "Notebook execution completed with errors"
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"