name: lint_python
on: [pull_request, push]
jobs:
  lint_python:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v2
      - run: pip install bandit black codespell flake8 isort mypy pytest pyupgrade safety tox
      - run: bandit --recursive --skip B105,B110,B311,B605,B607 .
      - run: black --check . || true
      - run: codespell  # --ignore-words-list="" --skip=""
      - run: flake8 --ignore=E12,E20,E226,E231,E265,E271,E40,E731,F401,W29,W605
                    --max-complexity=10 --max-line-length=255 --show-source --statistics .
      - run: isort --check-only --profile black . || true
      - run: pip install -r test-requirements.txt
      - run: make test || true
      - run: mypy --ignore-missing-imports . || true
      - run: pytest . || true
      - run: pytest --doctest-modules . || true
      - run: shopt -s globstar && pyupgrade --py36-plus **/*.py || true
      - run: safety check

name: lint_python
on: [pull_request, push]
jobs:
  lint_python:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v2
      - run: pip install bandit black codespell flake8 isort mypy pytest pyupgrade safety tox
      - run: bandit --recursive --skip B105,B110,B311,B605,B607 .
      - run: black --check .
      - run: codespell  # --ignore-words-list="" --skip=""
      - run: flake8 --ignore=E12,E20,E226,E231,E265,E271,E40,E731,F401,W29,W605
                    --max-complexity=10 --max-line-length=255 --show-source --statistics .
      - run: isort --check-only --profile black . || true
      - run: pip install -r test-requirements.txt
      - run: make test || true
      - run: mypy --ignore-missing-imports . || true
      - run: pytest . || true
      - run: pytest --doctest-modules . || true
      - run: shopt -s globstar && pyupgrade --py36-plus **/*.py || true
      - run: safety check

Enable code linter in CI
Enable code linter in CI

Enable code linter `black` on the CI to ensure
any commit/PR uses the same code linting.

Signed-off-by: Alexandre Lavigne <74b357371b721698434ec0643e6a62bbef389d49@gmail.com>
