Skip to content

Migrate from setup.py to pyproject.toml and Poetry #1199

Migrate from setup.py to pyproject.toml and Poetry

Migrate from setup.py to pyproject.toml and Poetry #1199

Workflow file for this run

name: Python package
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.x"] # pythonpublish.yml uses "3.x".
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: |

Check failure on line 23 in .github/workflows/pythonpackage.yml

View workflow run for this annotation

GitHub Actions / Python package

Invalid workflow file

The workflow is not valid. .github/workflows/pythonpackage.yml (Line: 23, Col: 14): Unrecognized named-value: 'POETRY_VERSION'. Located at position 1 within expression: POETRY_VERSION

Check failure on line 23 in .github/workflows/pythonpackage.yml

View workflow run for this annotation

GitHub Actions / Python package

Invalid workflow file

The workflow is not valid. .github/workflows/pythonpackage.yml (Line: 23, Col: 14): Unrecognized named-value: 'POETRY_VERSION'. Located at position 1 within expression: POETRY_VERSION
pipx install poetry==${{ POETRY_VERSION }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
- name: Install dependencies
run: |
poetry install
- name: Lint
run: |
poetry run black --check .
poetry run mypy .
- name: Test with pytest
run: |
poetry run pytest
env:
ENVIRONMENT: local