Skip to content

Split up tests

Split up tests #59

Workflow file for this run

name: Python Tests

Check failure on line 1 in .github/workflows/test.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/test.yaml

Invalid workflow file

(Line: 93, Col: 11): Unexpected value '', (Line: 107, Col: 11): Unexpected value '', (Line: 117, Col: 11): Unexpected value ''
permissions:
contents: read
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
inputs:
e2e:
description: Run end-to-end tests
required: false
default: false
type: boolean
jobs:
unit:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest]
steps:
- uses: actions/checkout@v6
- name: Setup venv
uses: ./.github/actions/setup-venv
- name: Run quick tests
id: run-quick-tests
shell: bash
run: >
uv run pytest \
-m "unit" \
--junitxml=pytest-quick.xml \
--cov=src tests \
--log-level=DEBUG \
--verbose
all:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup venv
uses: ./.github/actions/setup-venv
- name: Run quick tests
id: run-quick-tests
shell: bash
run: >
uv run pytest \
-m "not slow and not full_pipeline" \
--runner=docker \
--junitxml=pytest-quick.xml \
--cov=src tests \
--log-level=DEBUG \
--verbose
- name: Run slow tests (manual trigger)
if: github.event_name == 'workflow_dispatch'
shell: bash
run: >
uv run pytest \
-m "slow and not full_pipeline" \
--runner=docker \
--junitxml=pytest-slow.xml \
--cov=src tests \
--cov-append \
--verbose
- name: Run full pipeline tests (manual trigger)
if: github.event_name == 'workflow_dispatch' && inputs.e2e == true
shell: bash
run: >
uv run pytest \
-m "full_pipeline" \
--runner=docker \
--junitxml=pytest-full.xml \
--cov=src tests \
--cov-append \
--verbose
- name: Generate coverage report
shell: bash
run: >
uv run pytest \
--cov-report=term-missing:skip-covered \
--cov-report=xml:coverage.xml \
--cov=src
ruff:
runs-on: ubuntu-latest
needs:
steps:
- uses: actions/checkout@v6
- name: Setup venv
uses: ./.github/actions/setup-venv
with:
only-dev: true
- name: Ruff format
run: uv run ruff format --check
- name: Ruff check
run: uv run ruff check
mypy:
runs-on: ubuntu-latest
needs:
steps:
- uses: actions/checkout@v6
- name: Setup venv
uses: ./.github/actions/setup-venv
- run: |
uv run mypy .
deptry:
runs-on: ubuntu-latest
needs:
steps:
- uses: actions/checkout@v6
- name: Setup venv
uses: ./.github/actions/setup-venv
- run: |-
uv run deptry ./src