File tree Expand file tree Collapse file tree 2 files changed +22
-24
lines changed Expand file tree Collapse file tree 2 files changed +22
-24
lines changed Original file line number Diff line number Diff line change @@ -26,24 +26,20 @@ jobs:
2626 python-version : ${{ matrix.python-version }}
2727 - name : Install dependencies
2828 run : |
29- python -m pip install --upgrade pip
30- python -m pip install dev-requirements.txt
31- if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
29+ make install
3230 - name : Check code style with black
3331 run : |
34- black --check .
32+ make code-style
3533 - name : Check import order with isort
3634 run : |
37- isort -- check .
35+ make import- check
3836 - name : Lint with flake8
3937 run : |
40- # stop the build if there are Python syntax errors or undefined names
41- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
42- # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
43- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
38+ make linting
4439 - name : Check static type checking with mypy
4540 run : |
46- mypy .
47- - name : Test with pytest
48- run : |
49- pytest
41+ make typecheck
42+ # FIXME when C backend will be added to CI cache
43+ # - name: Test with pytest
44+ # run: |
45+ # make tests
Original file line number Diff line number Diff line change @@ -23,24 +23,25 @@ install :
2323
2424# Testing
2525
26- .PHONY : flake8
27- flake8 :
28- flake8 arrayfire_wrapper tests examples
26+ .PHONY : code-style
27+ code-style :
28+ black --check arrayfire_wrapper tests
2929
30- .PHONY : import-sort
31- import-sort :
32- isort arrayfire_wrapper tests examples
30+ .PHONY : linting
31+ linting :
32+ flake8 --count --show-source --statistics arrayfire_wrapper tests
33+
34+ .PHONY : import-check
35+ import-check :
36+ isort --check arrayfire_wrapper tests
3337
3438.PHONY : typecheck
3539typecheck :
36- mypy arrayfire_wrapper tests examples --cache-dir=/dev/null
40+ mypy arrayfire_wrapper tests --cache-dir=/dev/null
3741
3842.PHONY : tests
3943tests :
40- pytest --color=yes -v -rf --durations=40 \
41- --cov-config=.coveragerc \
42- --cov=$(SRC ) \
43- --cov-report=xml
44+ pytest --color=yes -v -rf
4445
4546# Cleaning
4647
@@ -50,4 +51,5 @@ clean :
5051 rm -rf arrayfire_wrapper.egg-info/
5152 rm -rf dist/
5253 rm -rf build/
54+ rm final_requirements.txt
5355 find . | grep -E ' (\.mypy_cache|__pycache__|\.pyc|\.pyo$$)' | xargs rm -rf
You can’t perform that action at this time.
0 commit comments