add isort and black and github workflows #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python Linting | |
on: [push, pull_request] | |
jobs: | |
PythonLinting: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
project: [bespoke] # Add other projects here | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Install dependencies | |
run: | | |
cd ${{ matrix.project }} | |
pip install poetry | |
poetry install | |
- name: Run black | |
run: | | |
cd ${{ matrix.project }} | |
poetry run black --check . | |
- name: Run isort | |
run: | | |
cd ${{ matrix.project }} | |
poetry run isort --check . |