File tree
Expand file treeCollapse file tree2 files changed
+22
-24
lines changed Expand file treeCollapse file tree2 files changed
+22
-24
lines changed Original file line number | Diff line number | Diff line change |
---|
@@ -26,24 +26,20 @@ jobs:
|
26 | 26 | python-version: ${{ matrix.python-version }}
|
27 | 27 | - name: Install dependencies
|
28 | 28 | 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 |
32 | 30 | - name: Check code style with black
|
33 | 31 | run: |
|
34 |
| -black --check . |
| 32 | +make code-style |
35 | 33 | - name: Check import order with isort
|
36 | 34 | run: |
|
37 |
| -isort --check . |
| 35 | +make import-check |
38 | 36 | - name: Lint with flake8
|
39 | 37 | 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 editor is 127 chars wide |
43 |
| -flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics |
| 38 | +make linting |
44 | 39 | - name: Check static type checking with mypy
|
45 | 40 | 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 :
|
23 | 23 |
|
24 | 24 | # Testing
|
25 | 25 |
|
26 |
| -.PHONY : flake8 |
27 |
| -flake8 : |
28 |
| -flake8 arrayfire_wrapper tests examples |
| 26 | +.PHONY : code-style |
| 27 | +code-style : |
| 28 | +black --check arrayfire_wrapper tests |
29 | 29 |
|
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 |
33 | 37 |
|
34 | 38 | .PHONY : typecheck
|
35 | 39 | typecheck :
|
36 |
| -mypy arrayfire_wrapper tests examples --cache-dir=/dev/null |
| 40 | +mypy arrayfire_wrapper tests --cache-dir=/dev/null |
37 | 41 |
|
38 | 42 | .PHONY : tests
|
39 | 43 | tests :
|
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 |
44 | 45 |
|
45 | 46 | # Cleaning
|
46 | 47 |
|
@@ -50,4 +51,5 @@ clean :
|
50 | 51 | rm -rf arrayfire_wrapper.egg-info/
|
51 | 52 | rm -rf dist/
|
52 | 53 | rm -rf build/
|
| 54 | +rm final_requirements.txt |
53 | 55 | find . | grep -E '(\.mypy_cache|__pycache__|\.pyc|\.pyo$$)' | xargs rm -rf
|
You can’t perform that action at this time.
0 commit comments