-
Notifications
You must be signed in to change notification settings - Fork 13
45 lines (37 loc) · 1.22 KB
/
python.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
name: "Python lint and unit/integration tests"
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8==6.0.0 flake8-import-order==0.18.2 darglint==1.8.1 codespell mypy types-requests werkzeug
- name: Lint with flake8
run: |
flake8 --statistics
- name: Check static typing
run: |
mypy . --explicit-package-bases
- name: Run unit and integration tests
run: |
sudo apt -y install apache2-dev
python -m pip install -r requirements.txt
cd unit-tests
python -m unittest
- name: Check code for common misspellings
run: |
codespell -q 3 --skip="*.css,*.r,*.xsd,*.json,*.map,*.js" || true
- name: Check McCabe complexity
run: |
flake8 --max-complexity 10 || true