Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 9 additions & 33 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,46 +19,22 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
# Python 3.9 is on macos-13 but not macos-latest (macos-14-arm64)
# https://github.com/actions/setup-python/issues/696#issuecomment-1637587760
exclude:
- { python-version: "3.8", os: "macos-latest" }
- { python-version: "3.9", os: "macos-latest" }
- { python-version: "3.11", os: "macos-latest" }
include:
- { python-version: "3.8", os: "macos-13" }
- { python-version: "3.9", os: "macos-13" }
- { python-version: "3.11", os: "macos-13" }
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
defaults:
run:
shell: bash
steps:
- uses: actions/[email protected]
- name: Install and configure Poetry # This could be cached, too...
uses: snok/[email protected]
with:
version: 1.4.2
virtualenvs-in-project: true
- uses: actions/[email protected]
- name: Install Poetry
run: pipx install poetry==1.7.1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5.2.0
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
cache: "poetry"
- name: Install dependencies
run: poetry install
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction
- name: Run mypy
run: |
source $VENV
mypy .
run: poetry run mypy .
- name: Test with pytest
run: |
source $VENV
pytest tests -v
run: poetry run pytest tests -v
2 changes: 0 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@ repos:
rev: 24.1.1
hooks:
- id: black
language_version: python3.8

Loading