Skip to content

Commit

Permalink
split lint and format actions
Browse files Browse the repository at this point in the history
  • Loading branch information
shimwell committed Mar 14, 2022
1 parent b778c83 commit 96f3eb1
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 6 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/auto_format_pep8.yml
Original file line number Diff line number Diff line change
@@ -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==22.1.0
- name: Run black
run: |
black . --line-length=120
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "[skip ci] Apply formatting changes"
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ jobs:
python -m pip install --upgrade pip
pip install flake8
flake8 . --show-source --statistics --max-line-length 120
- name: Install black
run: |
pip install black==22.1.0
- name: Run black
run: |
black .
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "[skip ci] Apply formatting changes"

0 comments on commit 96f3eb1

Please sign in to comment.