-
Notifications
You must be signed in to change notification settings - Fork 23
64 lines (55 loc) · 1.55 KB
/
pythonpackage.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
name: Python package
on: [push]
jobs:
build:
strategy:
matrix:
os: [windows-latest]
python-version: [ "3.9", "3.10"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install Mesa
run: |
sudo apt-get install libglu1-mesa-dev
if: matrix.os == 'ubuntu-latest'
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip freeze
- name: Ruff format
run: |
pip install ruff
ruff format --check .
- name: Lint with Ruff
run: |
pip install ruff
ruff .
- name: Mypy
run: |
pip install mypy
mypy .
- name: Install Deodr
run: |
python setup.py install
- name: Measure code complexity and maintainability
run: |
pip install radon
radon mi deodr
radon cc deodr
- name: Test with pytest
run: |
pip install pytest
pip install pytest-cov
cd tests
pytest
- name: Lint with flake8
run: |
pip install flake8 pep8-naming flake8-bugbear flake8-builtins flake8-docstrings flake8-import-order flake8-quotes
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --radon-max-cc 16