System tests #56
Workflow file for this run
This file contains 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: Unit and integration tests | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: | | |
3.11 | |
3.12 | |
- name: Install the latest version of uv | |
uses: astral-sh/setup-uv@v2 | |
- name: Run tests | |
run: | | |
uv sync --all-extras | |
uv sync --dev | |
uv pip install "adtl[parquet] @ git+https://github.com/globaldothealth/adtl" | |
uv run pytest --cov=InsightBoard --cov-report=html tests/unit | |
uv run pytest tests/system | |
- name: Upload coverage report | |
uses: actions/upload-artifact@v4 | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
with: | |
name: coverage-report | |
path: htmlcov | |
- name: Add coverage report to action summary | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: cat htmlcov/index.html > $GITHUB_STEP_SUMMARY |