Skip to content

Commit c5f1394

Browse files
authored
Update lint_python.yml
1 parent 2d82b97 commit c5f1394

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

.github/workflows/lint_python.yml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
11
name: lint_python
2-
on: [push, pull_request]
2+
on: [pull_request, push]
33
jobs:
44
lint_python:
55
runs-on: ubuntu-latest
66
steps:
7-
- uses: actions/checkout@master
8-
- uses: actions/setup-python@master
9-
- run: pip install black codespell flake8 isort pytest
7+
- uses: actions/checkout@v2
8+
- uses: actions/setup-python@v2
9+
- run: pip install --upgrade pip wheel
10+
- run: pip install bandit black codespell flake8 flake8-2020 flake8-bugbear
11+
flake8-comprehensions isort mypy pytest pyupgrade safety
12+
- run: bandit --recursive --skip B101 . || true # B101 is assert statements
1013
- run: black --check . || true
11-
- run: codespell --quiet-level=2 || true # --ignore-words-list="" --skip=""
14+
- run: codespell || true # --ignore-words-list="" --skip="*.css,*.js,*.lock"
1215
- run: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
13-
- run: isort --recursive . || true
14-
- run: pip install -r requirements.txt || true
15-
- run: pytest .
16+
- run: flake8 . --count --exit-zero --max-complexity=10 --max-line-length=88
17+
--show-source --statistics
18+
- run: isort --check-only --profile black . || true
19+
- run: pip install -r requirements.txt || pip install --editable . || true
20+
- run: mkdir --parents --verbose .mypy_cache
21+
- run: mypy --ignore-missing-imports --install-types --non-interactive . || true
22+
- run: pytest . || true
23+
- run: pytest --doctest-modules . || true
24+
- run: shopt -s globstar && pyupgrade --py36-plus **/*.py || true
25+
- run: safety check

0 commit comments

Comments
 (0)