chore: add badge showing supported python versions in README #178
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: Python tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
- windows-latest | |
python-version: | |
- "3.10" | |
- "3.11" | |
- "3.12" | |
- "3.13" | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install poetry | |
run: pip install --upgrade poetry | |
- name: Install dependencies | |
run: poetry install --extras test | |
- name: Run unittest (windows) | |
if: runner.os == 'Windows' | |
run: | | |
& ((poetry env info --path) + "\Scripts\activate.ps1") | |
python -m unittest discover tests | |
- name: Run unittest (linux and macos) | |
if: runner.os != 'Windows' | |
run: | | |
source $(poetry env info --path)/bin/activate | |
python -m unittest discover tests |