Add CI for [Test]PyPi (#36) #171
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: Run Tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- "main" | |
- "breaking" | |
workflow_dispatch: | |
jobs: | |
run-tests-modern-python: | |
strategy: | |
fail-fast: true | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
runs-on: ["ubuntu-latest"] | |
# Pull in the test script from run_tests and distribute python from matrix versions | |
uses: ./.github/workflows/run_tests.yaml | |
with: | |
python-version: ${{ matrix.python-version }} | |
runs-on: ${{ matrix.runs-on }} | |
requirements-file: ".github/requirements-${{ matrix.python-version }}.txt" | |
run-tests-legacy-python: | |
needs: run-tests-modern-python # Wait until tests pass on python 3.9+ | |
strategy: | |
fail-fast: false # Legacy versions are much less stable - run tests independently | |
matrix: # Code works on py3.6, but type annotations are broken | |
python-version: ["3.7", "3.8"] | |
runs-on: ["ubuntu-20.04"] | |
uses: ./.github/workflows/run_tests.yaml | |
with: | |
python-version: ${{ matrix.python-version }} | |
runs-on: ${{ matrix.runs-on }} | |
requirements-file: ".github/requirements-${{ matrix.python-version }}.txt" |