1- name : Python Linting
1+ name : " Linting"
22
33on :
44 push :
77 branches : [ main ]
88
99jobs :
10- build :
11-
10+ hadolint :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v2
14+ -
uses :
hadolint/[email protected] 15+ with :
16+ dockerfile : Dockerfile
17+ black :
1218 runs-on : ubuntu-latest
1319 strategy :
1420 fail-fast : true
1521 matrix :
16- python-version : [3.8, 3.9]
17-
22+ python-version : [3.9]
1823 steps :
1924 - uses : actions/checkout@v2
2025 - name : Set up Python ${{ matrix.python-version }}
2126 uses : actions/setup-python@v2
2227 with :
2328 python-version : ${{ matrix.python-version }}
24- - name : Install Poetry, Install Dependencies, and Execute Linters
29+ - name : " Setup environment"
30+ uses : " networktocode/gh-action-setup-poetry-environment@v2"
31+ - name : " Linting: Black"
2532 run : |
26- curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
27- source $HOME/.poetry/env
28- poetry install
2933 poetry run black --diff netopsio/
34+ pylint :
35+ runs-on : ubuntu-latest
36+ strategy :
37+ fail-fast : true
38+ matrix :
39+ python-version : [3.9]
40+ steps :
41+ - uses : actions/checkout@v2
42+ - name : Set up Python ${{ matrix.python-version }}
43+ uses : actions/setup-python@v2
44+ with :
45+ python-version : ${{ matrix.python-version }}
46+ - name : " Setup environment"
47+ uses : " networktocode/gh-action-setup-poetry-environment@v2"
48+ - name : " Linting: PyLint"
49+ run : |
3050 poetry run pylint netopsio/netopsio/ netopsio/home/
31- poetry run flake8 netopsio/ --ignore E501
32- # poetry run bandit -r netopsio/
51+ flake8 :
52+ runs-on : ubuntu-latest
53+ strategy :
54+ fail-fast : true
55+ matrix :
56+ python-version : [3.9]
57+ steps :
58+ - uses : actions/checkout@v2
59+ - name : Set up Python ${{ matrix.python-version }}
60+ uses : actions/setup-python@v2
61+ with :
62+ python-version : ${{ matrix.python-version }}
63+ - name : " Setup environment"
64+ uses : " networktocode/gh-action-setup-poetry-environment@v2"
65+ - name : " Linting: Flake8"
66+ run : |
67+ poetry run flake8 netopsio/ --ignore E501
0 commit comments