4040 python -m venv env
4141 source env/bin/activate
4242 pip install --upgrade pip
43- pip install .
43+ pip install ".[test]"
4444
4545 # Run a basic command to check installation
4646 - name : Check installation
@@ -55,42 +55,62 @@ jobs:
5555 pytest .
5656 env :
5757 CI : true
58-
59- # Linting job
60- lint :
61- runs-on : ubuntu-latest
6258
59+ - name : Test docs build
60+ run : |
61+ pip install ".[docs]"
62+ sphinx-apidoc -o docs src/app
63+ cd docs
64+ make clean
65+ make html
66+ cd ..
67+ ls docs/_build/html/index.html
68+
69+ # Static analysis
70+ static-analysis :
71+ runs-on : ubuntu-latest
6372 steps :
64- # Checkout the repository
65- - name : Checkout code
66- uses : actions/checkout@v3
73+ - name : Checkout the code
74+ uses : actions/checkout@v4
6775
68- # Set up Python
69- - name : Set up Python
70- uses : actions/setup-python@v4
71- with :
72- python-version : ' 3.10'
76+ - name : Download and run cloc
77+ run : |
78+ curl -s https://raw.githubusercontent.com/AlDanial/cloc/master/cloc > cloc
79+ chmod +x cloc
80+ ./cloc --version
81+ ./cloc $(git ls-files)
7382
74- # Cache pip dependencies
75- - name : Cache pip
76- uses : actions/cache@v3
77- with :
78- path : ~/.cache/pip
79- key : ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }}
80- restore-keys : |
81- ${{ runner.os }}-pip-
83+ - name : Code formatting with black
84+ run : |
85+ pip install black
86+ pip install "black[jupyter]"
87+ black --check src/
8288
83- # Install linting tools
84- - name : Install linting tools
89+ - name : Code formatting with isort
8590 run : |
86- python -m venv env
87- source env/bin/activate
88- pip install --upgrade pip
89- pip install black isort
91+ pip install isort
92+ isort --check src/
9093
91- # Code formatting check with black and isort
92- - name : Run linters
94+ - name : Code formatting with prospector
95+ continue-on-error : true
9396 run : |
94- source env/bin/activate
95- black --check src/
96- isort --check src/
97+ pip install mypy
98+ mypy src/
99+
100+ - name : Code formatting with prospector
101+ continue-on-error : true
102+ run : |
103+ pip install prospector
104+ prospector src/
105+
106+ - name : Code formatting with ruff
107+ continue-on-error : true
108+ run : |
109+ pip install ruff
110+ ruff check src/
111+
112+ - name : Code formatting with pylint
113+ continue-on-error : true
114+ run : |
115+ pip install pylint
116+ pylint src/
0 commit comments