[pre-commit.ci] pre-commit suggestions #97
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: Code formatting | |
# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows | |
on: # Trigger the workflow on push or pull request, but only for the main branch | |
push: {} | |
pull_request: | |
branches: [master] | |
jobs: | |
pep8-check-flake8: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.7 | |
- name: Install dependencies | |
run: | | |
pip install flake8 | |
pip list | |
shell: bash | |
- name: PEP8 | |
run: | | |
flake8 . | |
imports-check-isort: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install isort | |
run: | | |
pip install isort | |
pip list | |
- name: isort | |
run: | | |
isort . --check --diff | |
format-check-yapf: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
pip install --upgrade pip | |
pip install yapf | |
pip list | |
shell: bash | |
- name: yapf | |
run: | | |
yapf --diff --parallel --recursive . |