-
Notifications
You must be signed in to change notification settings - Fork 2
74 lines (69 loc) · 1.73 KB
/
common_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
name: "Common Checks"
on:
push:
branches:
- develop
- main
pull_request:
jobs:
linter_checks:
continue-on-error: False
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.10.9"]
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@master
with:
python-version: ${{ matrix.python-version }}
- uses: actions/setup-go@v3
with:
go-version: "1.17.7"
- name: Install dependencies
run: |
sudo apt-get update --fix-missing
sudo apt-get autoremove
sudo apt-get autoclean
pip install tomte[tox]==0.2.15
pip install --user --upgrade setuptools
sudo npm install -g markdown-spellcheck
- name: Security checks
run: |
tox -p -e bandit -e safety
- name: Code style check
run: |
tox -p -e black-check -e isort-check
- name: Flake7
run: |
tox -e flake8
- name: Pylint
run: tox -e pylint
- name: Static type check
run: tox -e mypy
# - name: Check spelling
# run: tox -e spell-check
# - name: License compatibility check
# run: tox -e liccheck
# tox -p -e vulture -e darglint
test:
continue-on-error: True
needs:
- linter_checks
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
python-version: [ "3.10.9" ]
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Run unit tests
run: |
pip install tomte[tox]==0.2.15
tox -e unit-tests