Run formatting checks with poetry (#537)

* update black version

* add workflow dispatch
This commit is contained in:
Sarah Wooders
2023-11-30 13:30:58 -08:00
committed by GitHub
parent 0b5d921843
commit 313dc471c8

View File

@@ -4,6 +4,7 @@ on:
pull_request:
paths:
- '**.py'
workflow_dispatch:
jobs:
black-check:
@@ -13,15 +14,24 @@ jobs:
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.10.10
python-version: "3.11"
- name: Install Black
run: pip install black
- name: Install poetry
run: pip install poetry
- name: Set Poetry config
run: |
poetry config virtualenvs.in-project false
poetry config virtualenvs.path ~/.virtualenvs
- name: Install dependencies using Poetry
run: |
poetry install -E dev
- name: Run Black
run: black --check . -l 140
run: poetry run black --check . -l 140
# (Optional) If you want to automatically fix formatting issues
# Uncomment the following steps: