Skip to content

Commit 182db32

Browse files
authored
Merge pull request #117 from cclauss/patch-1
GitHub Action to lint Python code
2 parents 2869d2c + 3d66fb9 commit 182db32

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/lint_python.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: lint_python
2+
on: [pull_request, push]
3+
jobs:
4+
lint_python:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v2
8+
- uses: actions/setup-python@v2
9+
- run: pip install bandit black codespell flake8 isort mypy pytest pyupgrade safety
10+
- run: bandit -r . || true
11+
- run: black --check . || true
12+
- run: codespell --quiet-level=2 || true # --ignore-words-list="" --skip=""
13+
- run: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
14+
- run: isort --check-only --profile black . || true
15+
- run: pip install -r requirements.txt
16+
- run: mypy --ignore-missing-imports .
17+
- run: pytest . || true
18+
- run: pytest --doctest-modules . || true
19+
- run: shopt -s globstar && pyupgrade --py36-plus **/*.py || true
20+
- run: safety check

0 commit comments

Comments
 (0)