Skip to content

Change actions to take python version from pyproject.toml #22

Change actions to take python version from pyproject.toml

Change actions to take python version from pyproject.toml #22

Workflow file for this run

name: format
on: push
jobs:
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: 'pyproject.toml'
- name: Check python version
run: python -c "import sys; print(sys.version)"
- name: Install deps
uses: knowsuchagency/poetry-install@v1
- name: Run black check
run: poetry run black --check --diff .
isort:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: 'pyproject.toml'
- name: Install deps
uses: knowsuchagency/poetry-install@v1
- name: Run isort check
run: poetry run isort --check-only --diff .
flake8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: 'pyproject.toml'
- name: Install deps
uses: knowsuchagency/poetry-install@v1
- name: Run flake8 check
run: poetry run flake8 --count .
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: 'pyproject.toml'
- name: Install deps
uses: knowsuchagency/poetry-install@v1
- name: Run mypy check
run: poetry run mypy .