Skip to content

refactor: typing module re-organization #144

refactor: typing module re-organization

refactor: typing module re-organization #144

Workflow file for this run

name: Tests
on:
push:
branches: [ trunk ]
pull_request:
branches: [ trunk ]
defaults:
run:
shell: bash
jobs:
unit_tests:
strategy:
fail-fast: false
matrix:
python-version: [ "3.10", "3.11", "3.12", "3.13" ]
os: [ ubuntu-latest, windows-latest, macos-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Setup the Python Environment ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
- name: Install dependencies
run: |
poetry install --all-extras --with dev
- name: Run tests
run: |
poetry run pytest .
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
mypy:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Setup the Python Environment ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
- name: Install dependencies
run: |
poetry install --all-extras --with dev,typecheck
- name: Validate type-hints with MyPy
run: poetry run mypy
pyright:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Setup the Python Environment ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
- name: Install dependencies
run: |
poetry install --all-extras --with dev,typecheck
- name: Validate type-hints with pyright
run: |
poetry run pyright pydantic_numpy
format:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.12" ]
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Setup the Python Environment ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
- name: Install dependencies
run: |
poetry install --all-extras --with format
- name: Check code formatting
run: |
poetry run black . --check --diff
poetry run isort . --check --diff
poetry run ruff check .