Avoid duplication of test runs with push and PR, and ensure latest ma… #361
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: Linting | |
on: | |
pull_request: | |
branches: | |
- develop | |
push: | |
branches: | |
- develop | |
workflow_dispatch: | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 1 | |
matrix: | |
python-version: ['3.10'] | |
name: Python ${{ matrix.python-version }} Test Pop | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools setuptools_scm wheel | |
pip install pydocstyle black flake8 isort | |
pip install -e .[tests] | |
- name: sort imports | |
run: | | |
isort . --atomic --profile black | |
- name: check docstrings | |
run: | | |
pydocstyle --version | |
pydocstyle -e --count --convention=google --add-ignore=D400,D415,D212,D205,D417,D107 shakenbreak | |
- name: black | |
run: | | |
black --version | |
black --color shakenbreak | |
black --check --diff --color shakenbreak | |
- name: flake8 | |
run: | | |
flake8 --version | |
flake8 --max-line-length 107 --color always --ignore=E121,E123,E126,E203,E226,E24,E704,W503,W504,F401,E203 shakenbreak |