Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #33
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: | |
push: | |
branches: [master] # on all branches? | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# code style (blacken) | |
- tool: "black" | |
command: "python -m black --check --diff --color ." | |
deps: "black" | |
# code style (import ordering) | |
- tool: "isort" | |
command: "python -m isort --check --diff --color ." | |
deps: "isort" | |
# (pyflakes, pycodestyle, mccabe) + pep8-naming | |
- tool: "flake8" | |
command: "python -m flake8 ." | |
deps: "flake8 pep8-naming flake8-bugbear" | |
# source linting | |
- tool: "pylint" | |
command: "python -m pylint compass" # also lint tests/ ? | |
deps: "pylint" | |
# PEP 257 compliance | |
- tool: "pydocstyle" | |
command: "python -m pydocstyle ." | |
deps: "pydocstyle" | |
# Common security issues | |
- tool: "bandit" | |
command: "python -m bandit -c ci/bandit.yml -r ." | |
deps: "bandit" | |
# packaging (CheeseShop) compliance | |
- tool: "pyroma" | |
command: "pyroma ." | |
deps: "pyroma" | |
# type checking | |
- tool: "mypy" | |
command: "mypy --namespace-packages -p compass" | |
deps: "-r ci/requirements-core.txt -r ci/requirements-typing.txt mypy" | |
name: lint using ${{ matrix.tool }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: python -m pip install ${{ matrix.deps }} | |
- name: Run ${{ matrix.tool }} | |
run: ${{ matrix.command }} | |
release-file: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'pull_request' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Check for RELEASE.rst | |
run: test -e RELEASE.rst | |
- name: No RELEASE.rst file found! | |
if: failure() | |
run: echo "::error::You need to add a RELEASE.rst file at the top-level." |