Skip to content

Change from setup.py to pyproject.toml based project definition #390

Change from setup.py to pyproject.toml based project definition

Change from setup.py to pyproject.toml based project definition #390

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/ruff-action@v3
test:
strategy:
fail-fast: false
max-parallel: 8
matrix:
# python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: [3.7, 3.8, 3.14]
os: [ubuntu-22.04, windows-latest, macos-latest]
exclude:
- os: macos-latest
python-version: 3.7
- os: windows-latest # wierd bug with windows and python 3.7 and uv
python-version: 3.7
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install uv # UV could be used to install python, but only has >=3.8 support
uses: astral-sh/setup-uv@v6
with:
version: "0.9.8"
enable-cache: true
- name: Install dependencies
run: |
uv sync --locked --all-extras --dev
- name: Unit Test with pytest
run: |
uv run coverage run -m pytest tests/unit/ --junitxml=junit/unit-test-results.xml
- name: Functional Test with pytest
run: |
uv run coverage run -m pytest tests/functional/ --junitxml=junit/functional-test-results.xml
- name: Integration Test with pytest
run: |
uv run coverage run -m pytest tests/integration/ --junitxml=junit/integration-test-results.xml
env:
PYTHONIOENCODING: UTF-8
- name: Report code coverage
run: |
uv run coverage combine
uv run coverage report
uv run coverage xml
uv run coverage html
- name: Upload coverage to Codecov
# codecov only runs on Linux
if: startsWith(matrix.os, 'ubuntu-')
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
- name: Minimize uv cache
run: uv cache prune --ci