-
Notifications
You must be signed in to change notification settings - Fork 15
99 lines (93 loc) · 2.75 KB
/
do-static-checks.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# This workflow runs when a push is made or a PR is opened, reopened, or synchronized.
#
# - Job 1:
# - Run bandit against the entire code base.
# - Job 2:
# - Run black, isort, and docformatter against the entire code base.
# - Job 3:
# - Run pycodestyle and pydocstyle against the entire code base.
# - Job 4:
# - Run mypy agaisnt the entire code base.
# - Job 5:
# - Run pylint and flake8 (future) against the entire code base.
name: Perform Static Checks on RAMSTK Code Base
on:
push:
branches:
- 'master'
- 'dependabot/**'
- '!release/**'
- '!chore/**'
- '!docs/**'
paths:
- "**.py"
- "**.lock"
tags-ignore:
- "*"
pull_request:
paths:
- "**.py"
types:
- "opened"
- "reopened"
- "synchronize"
jobs:
bandit:
name: Check for Security Vulnerabilities
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run bandit against repository
uses: jpetrucciani/bandit-check@master
with:
path: 'src/ramstk'
format-check:
name: Check Code Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check code format with black, isort, and docformatter
uses: weibullguy/python-lint-plus@master
with:
python-root-list: "src/ramstk"
use-black: true
use-isort: true
use-docformatter: true
extra-black-options: "--config ./pyproject.toml"
extra-isort-options: "--settings-file ./pyproject.toml"
extra-docformatter-options: "--config ./pyproject.toml"
style-check:
name: Check Code Styling
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check code style with pycodestyle and pydocstyle
uses: weibullguy/python-lint-plus@master
with:
python-root-list: "src/ramstk"
use-pycodestyle: true
use-pydocstyle: true
extra-pycodestyle-options: "--config=./setup.cfg --count"
extra-pydocstyle-options: "--count"
type-check:
name: Check Code Type Hinting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check code type hinting with mypy
uses: weibullguy/python-lint-plus@master
with:
python-root-list: "src/ramstk"
use-mypy: true
extra-mypy-options: "--config-file ./pyproject.toml"
lint-check:
name: Check Code Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Lint code with pylint
uses: weibullguy/python-lint-plus@master
with:
python-root-list: "src/ramstk"
use-pylint: true
extra-pylint-options: "-j0 --rcfile=./pyproject.toml"