Skip to content

docs(phase-49): test_29 attributes 96% of post-F1 spike variance to A… #165

docs(phase-49): test_29 attributes 96% of post-F1 spike variance to A…

docs(phase-49): test_29 attributes 96% of post-F1 spike variance to A… #165

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Set up Python
run: uv python install
- name: Install dependencies
run: uv sync --extra cpu --extra dev
- name: Ruff lint
run: uv run ruff check master_thesis_code/ master_thesis_code_test/
- name: Ruff format check
run: uv run ruff format --check master_thesis_code/ master_thesis_code_test/
- name: mypy
run: uv run mypy master_thesis_code/ master_thesis_code_test/
- name: pytest (CPU only)
run: uv run pytest -m "not gpu and not slow"
- name: Upload coverage report
uses: actions/upload-artifact@v7
with:
name: coverage-xml
path: coverage.xml
integration:
runs-on: ubuntu-latest
needs: check
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Set up Python
run: uv python install
- name: Install dependencies
run: uv sync --extra cpu --extra dev
- name: Run integration tests
run: uv run pytest -m slow --save-test-plots -v
- name: Upload test plots artifact
if: always()
uses: actions/upload-artifact@v7
with:
name: integration-test-plots
path: test-artifacts/
if-no-files-found: ignore
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Set up Python
run: uv python install
- name: Install dependencies
run: uv sync --extra cpu --extra dev
- name: Build docs
run: uv run make -C docs html SPHINXOPTS="-W"
- name: Upload docs artifact
uses: actions/upload-artifact@v7
with:
name: docs-html
path: docs/build/html/
pages:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: [integration, docs]
permissions:
pages: write
id-token: write
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Set up Python
run: uv python install
- name: Install dependencies
run: uv sync --extra cpu --extra dev
- name: Download docs artifact
uses: actions/download-artifact@v8
with:
name: docs-html
path: _site/
- name: Download test plots artifact
uses: actions/download-artifact@v8
with:
name: integration-test-plots
path: _site/test-plots/
continue-on-error: true
- name: Generate interactive figures
run: |
mkdir -p _site/interactive
cp interactive/*.html _site/interactive/
if [ -d cluster_results ]; then
uv run python -m master_thesis_code cluster_results --generate_interactive _site/interactive/ || true
fi
continue-on-error: true
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v4
with:
path: _site/
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4