diff --git a/.github/workflows/python-formatting.yml b/.github/workflows/python-formatting.yml new file mode 100644 index 0000000..dd4ed9e --- /dev/null +++ b/.github/workflows/python-formatting.yml @@ -0,0 +1,28 @@ +name: Enforce Python Code Formatting + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + format-check: + runs-on: ubuntu-latest + + steps: + - name: Check out the repository + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: "3.x" + + - name: Install black + run: pip install black + + - name: Run black + run: black --check .