Skip to content

Merge pull request #160 from PolicyEngine/maria/ssi_policy_tests #146

Merge pull request #160 from PolicyEngine/maria/ssi_policy_tests

Merge pull request #160 from PolicyEngine/maria/ssi_policy_tests #146

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
jobs:
Test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12", "3.13"]
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install R and dependencies (Python 3.13 only)
if: matrix.python-version == '3.13'
run: |
sudo apt-get update
sudo apt-get install -y r-base r-base-dev libtirpc-dev
- name: Install R packages (Python 3.13 only)
if: matrix.python-version == '3.13'
run: |
sudo Rscript -e 'install.packages("StatMatch", repos="https://cloud.r-project.org")'
sudo Rscript -e 'install.packages("clue", repos="https://cloud.r-project.org")'
- name: Install full dependencies (Python 3.13)
if: matrix.python-version == '3.13'
run: |
uv pip install -e ".[dev,docs,matching,mdn,images]" --system
- name: Install minimal dependencies (Python 3.12)
if: matrix.python-version == '3.12'
run: |
uv pip install -e ".[dev]" --system
- name: Run full tests with coverage (Python 3.13)
if: matrix.python-version == '3.13'
run: make test
- name: Run smoke test only (Python 3.12)
if: matrix.python-version == '3.12'
run: |
python -m pytest tests/test_smoke_qrf.py -v
python -m pytest tests/test_basic.py -v
- name: Run pipeline example
if: matrix.python-version == '3.13'
run: |
python examples/pipeline.py
- name: Upload microimputation results
if: always() && matrix.python-version == '3.13'
uses: actions/upload-artifact@v4
with:
name: microimputation-results-${{ github.sha }}
path: microimputation-dashboard/public/microimputation_results.csv
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
fail_ci_if_error: false
verbose: true