Fix type annotation to work under Python < 3.10 (#66) #79
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
# This workflow will install Python dependencies and run tests with a variety of Python versions | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Test | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
python-version: ["3.10", "3.11", "3.12", "pypy3.10"] | |
pytest-version: ["8"] | |
cython-version: ["0.29", "3"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} [pytest ${{ matrix.pytest-version }}, cython ${{ matrix.cython-version }}] | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade setuptools | |
python -m pip install pytest==${{ matrix.pytest-version }}.* | |
python -m pip install cython==${{ matrix.cython-version }}.* | |
python -m pip install -e . | |
- name: Test with pytest | |
run: | | |
pytest -vv tests src |