Skip to content

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

Migrate from setup.py to pyproject.toml and Poetry

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

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: |
pipx install poetry==${{ vars.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