From f0b8e2174e94009272e8074f697142f6a3e18bba Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Sun, 31 Oct 2021 07:27:06 +0000 Subject: [PATCH] added pep8 formatter --- .github/workflows/black.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/black.yml diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml new file mode 100644 index 0000000..4eee07f --- /dev/null +++ b/.github/workflows/black.yml @@ -0,0 +1,32 @@ +name: black + +on: + push: + paths: + - '**.py' + +defaults: + run: + shell: bash + +jobs: + black: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + ref: ${{ github.head_ref }} + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: 3.x + - name: Install black + run: | + python -m pip install --upgrade pip + pip install black + - name: Run black + run: | + black . + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: "[skip ci] Apply formatting changes"