name: lint_python
on: [pull_request, push]
jobs:
  lint_python:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python: ['3.7', '3.8', '3.9', '3.10-dev']
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python }}
      - run: pip install bandit mypy pyupgrade safety tox
      - run: bandit --recursive --skip B105,B110,B311,B605,B607 --exclude ./.tox .
        if: ${{ matrix.python >= '3.8' }}
      - run: tox -e lint
      - run: tox -e py
      - run: mypy --ignore-missing-imports . || true  # Need Python >= 3.6
      - run: shopt -s globstar && pyupgrade --py3-only **/*.py  # --py36-plus
      - run: safety check

name: lint_python
on: [pull_request, push]
jobs:
  lint_python:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python: ['3.7', '3.8', '3.9', '3.10-dev']
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python }}
      - run: pip install bandit mypy pyupgrade safety tox
      - run: bandit --recursive --skip B105,B110,B311,B605,B607 --exclude ./.tox .
        if: ${{ matrix.python >= '3.8' }}
      - run: tox -e lint
      - run: tox -e py
      - run: mypy --ignore-missing-imports . || true  # Need Python >= 3.6
      - run: shopt -s globstar && pyupgrade --py3-only **/*.py  # --py36-plus
      - run: safety check
      - run: tox -e build
      - run: tox -e doc

Build package and docs in CI
Build package and docs in CI

Add extra steps in CI to build package and documentation.
This makes sure the package can build and the doc generates fine
on each new push/PR.
