2021-04-24 23:54:20 +00:00
|
|
|
name: Python
|
2021-04-16 12:31:09 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ main ]
|
|
|
|
paths: '**.py'
|
|
|
|
pull_request:
|
|
|
|
branches: [ main ]
|
|
|
|
paths: '**.py'
|
2021-04-11 01:21:48 +00:00
|
|
|
jobs:
|
2021-04-16 12:31:09 +00:00
|
|
|
python:
|
2021-04-11 01:21:48 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-python@v2
|
2021-04-16 12:31:09 +00:00
|
|
|
- run: pip install bandit black flake8 isort mypy pytest pyupgrade safety
|
2021-04-11 01:21:48 +00:00
|
|
|
- run: bandit --recursive --skip B101 . # B101 is assert statements
|
|
|
|
- run: black --check . || true
|
|
|
|
- run: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
|
|
|
- run: isort --check-only --profile black .
|
|
|
|
- run: pip install -r requirements.txt || true
|
|
|
|
- run: mypy --ignore-missing-imports .
|
|
|
|
- run: pytest . || true
|
|
|
|
- run: pytest --doctest-modules .
|
|
|
|
- run: shopt -s globstar && pyupgrade --py36-plus **/*.py
|
|
|
|
- run: safety check
|