-
Notifications
You must be signed in to change notification settings - Fork 63
47 lines (40 loc) · 1.5 KB
/
codestyle.yml
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Codestyle checks
on: [ push, pull_request, workflow_dispatch ]
jobs:
codestyle:
strategy:
matrix:
os: [ubuntu-20.04, windows-2019]
runs-on: ${{ matrix.os }}
steps:
- name: Code checkout
uses: actions/checkout@v2
- name: Setting up Python
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Setting up Python dependencies
if: ${{ always() }}
run: python -m pip install -r requirements.txt
- name: Setting up Python codestyle checks/test dependencies
if: ${{ always() }}
run: python -m pip install -r requirements_dev.txt
- name: Running Bandit
if: ${{ matrix.os == 'ubuntu-20.04' }}
run: python -m bandit -r ./ -f screen -c bandit.yaml
- name: Running PEP checks
if: ${{ matrix.os == 'ubuntu-20.04' }}
run: python -m flake8 ./ --config=setup.cfg --show-source
- name: Running MyPy checks
if: ${{ matrix.os == 'ubuntu-20.04' }}
run: python -m mypy ./ --config-file ./setup.cfg --show-error-context --show-column-numbers --pretty
- name: Running pytest (not Docker image tests)
if: ${{ always() }}
run: python -m pytest ./utils/tests --self-contained-html --html=utils_unittests.html
- name: Collecting codestyle artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: codestyle_checks
path: |
./utils_unittests.html