-
Notifications
You must be signed in to change notification settings - Fork 28
26 lines (24 loc) · 1.04 KB
/
lint_python.yml
File metadata and controls
26 lines (24 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
name: lint_python
on: [pull_request]
jobs:
lint_python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10.12'
- run: pip install poetry
- name: Install same versions as in pre-commit hook
run: poetry install --with dev
- run: poetry run pre-commit run --all-files
- run: pip install bandit codespell flake8 mypy pytest pyupgrade safety
- run: bandit --recursive --skip B101 .
- run: codespell --ignore-words-list= Bu
- run: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- run: flake8 . --count --exit-zero --max-complexity=10 --max-line-length=88 --show-source --statistics
- run: pip install -r requirements.txt
- run: mypy --ignore-missing-imports --install-types --non-interactive . || true
- run: pytest . || pytest --doctest-modules . || true
- run: shopt -s globstar && pyupgrade --py36-plus **/*.py || true
- run: safety check || true