more cleanup #140
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: On Push | |
on: [push] | |
jobs: | |
black-lint: | |
name: Check formatting | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12.3" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install black | |
- name: Run Black formatter | |
run: | | |
black --check . | |
- name: Fail if code not formatted correctly | |
if: ${{ failure() }} | |
run: | | |
echo "Code is not formatted correctly. Please format with Black." | |
exit 1 |