@@ -2,14 +2,17 @@ name: Tests
22
33on :
44 pull_request :
5- branches : [main]
5+ branches :
6+ - main
67 push :
7- branches : [main]
8- tags : ' *'
8+ branches :
9+ - main
10+ tags :
11+ - ' *'
912
1013jobs :
11- tests :
12- name : Test (${{ matrix.os }}-${{ matrix.arch }} , julia ${{ matrix.jlversion }})
14+ julia :
15+ name : Test (${{ matrix.os }}, julia ${{ matrix.jlversion }})
1316 runs-on : ${{ matrix.os }}
1417 strategy :
1518 fail-fast : false
1922 jlversion : ['1','1.6']
2023 steps :
2124 - uses : actions/checkout@v2
22- - uses : julia-actions/setup-julia@v1
25+ - name : Set up Julia ${{ matrix.jlversion }}
26+ uses : julia-actions/setup-julia@v1
2327 with :
2428 version : ${{ matrix.jlversion }}
2529 arch : ${{ matrix.arch }}
@@ -33,11 +37,43 @@ jobs:
3337 ${{ runner.os }}-test-${{ env.cache-name }}-
3438 ${{ runner.os }}-test-
3539 ${{ runner.os }}-
36- - uses : julia-actions/julia-buildpkg@v1
37- - uses : julia-actions/julia-runtest@v1
40+ - name : Build package
41+ uses : julia-actions/julia-buildpkg@v1
42+ - name : Run tests
43+ uses : julia-actions/julia-runtest@v1
3844 env :
3945 JULIA_DEBUG : PythonCall
40- - uses : julia-actions/julia-processcoverage@v1
41- - uses : codecov/codecov-action@v1
46+ - name : Process coverage
47+ uses : julia-actions/julia-processcoverage@v1
48+ - name : Upload coverage to Codecov
49+ uses : codecov/codecov-action@v2
50+ python :
51+ name : Test (${{ matrix.os }}, python ${{ matrix.pyversion }})
52+ runs-on : ${{ matrix.os }}
53+ strategy :
54+ matrix :
55+ os : [ubuntu-latest, windows-latest, macos-latest]
56+ pyversion : ["3.7", "3.10"]
57+ steps :
58+ - uses : actions/checkout@v3
59+ - name : Set up Python ${{ matrix.pyversion }}
60+ uses : actions/setup-python@v4
4261 with :
43- file : lcov.info
62+ python-version : ${{ matrix.pyversion }}
63+ - name : Install dependencies
64+ run : |
65+ python -m pip install --upgrade pip
66+ pip install flake8 pytest pytest-cov
67+ cp pysrc/juliacall/juliapkg-dev.json pysrc/juliacall/juliapkg.json
68+ pip install -e .
69+ - name : Lint with flake8
70+ run : |
71+ # stop the build if there are Python syntax errors or undefined names
72+ flake8 . --count --select=E9,F63,F7,F82 --ignore=F821 --show-source --statistics
73+ # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
74+ flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
75+ - name : Run tests
76+ run : |
77+ pytest -s --cov=pysrc
78+ - name : Upload coverage to Codecov
79+ uses : codecov/codecov-action@v2
0 commit comments