1
- # TODO: Line 20, enable python-version: 3.5
2
- # TODO: Line 69, enable pytest --doctest-modules
3
-
4
1
name : Tests
5
-
6
- on :
7
- push :
8
- branches :
9
- - master
10
- pull_request :
11
- branches :
12
- - master
13
-
2
+ on : [push, pull_request]
14
3
jobs :
15
- test :
4
+ Test :
16
5
strategy :
17
- fail-fast : false
6
+ fail-fast : false
7
+ max-parallel : 15
18
8
matrix :
19
9
node : [10.x, 12.x, 14.x]
20
- python : [3.6, 3.7, 3.8]
10
+ python : [3.6, 3.7, 3.8, 3.9.0-rc.1 ]
21
11
os : [macos-latest, ubuntu-latest, windows-latest]
22
12
runs-on : ${{ matrix.os }}
23
13
steps :
@@ -37,30 +27,24 @@ jobs:
37
27
run : |
38
28
npm install --no-progress
39
29
pip install flake8 pytest
40
- - name : Lint python
30
+ - name : Set Windows environment
31
+ if : matrix.os == 'windows-latest'
32
+ uses : allenevans/set-env@v1
33
+ with :
34
+ GYP_MSVS_VERSION : " 2015"
35
+ GYP_MSVS_OVERRIDE_PATH : " C:\\ Dummy"
36
+ - name : Run Node tests
37
+ run : |
38
+ npm test
39
+ - name : Lint Python
41
40
if : matrix.os == 'ubuntu-latest'
42
41
run : |
43
42
# stop the build if there are Python syntax errors or undefined names
44
43
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
45
44
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
46
45
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
47
- - name : Run node tests (Linux and macOS)
48
- if : matrix.os != 'windows-latest'
49
- run : |
50
- npm test
51
- - name : Run python tests (Linux and macOS)
52
- if : matrix.os != 'windows-latest'
46
+ - name : Run Python tests
53
47
run : |
54
48
python -m pytest
55
- - name : Run node tests (Windows)
56
- if : matrix.os == 'windows-latest'
57
- shell : bash
58
- run : |
59
- GYP_MSVS_VERSION=2015 GYP_MSVS_OVERRIDE_PATH="C:\\Dummy" npm test
60
- - name : Run python tests (Windows)
61
- if : matrix.os == 'windows-latest'
62
- shell : bash
63
- run : |
64
- GYP_MSVS_VERSION=2015 GYP_MSVS_OVERRIDE_PATH="C:\\Dummy" python -m pytest
65
- # - name: Run doctests with pytest
66
- # run: pytest --doctest-modules
49
+ - name : Run doctests with pytest
50
+ run : python -m pytest --doctest-modules
0 commit comments