Skip to content

Commit cc9942e

Browse files
committed
reduce diff with python_tests
1 parent 80aa6c4 commit cc9942e

File tree

1 file changed

+17
-34
lines changed

1 file changed

+17
-34
lines changed

.github/workflows/tests.yml

Lines changed: 17 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,13 @@
1-
# TODO: Line 20, enable python-version: 3.5
2-
# TODO: Line 69, enable pytest --doctest-modules
3-
41
name: Tests
5-
6-
on:
7-
push:
8-
branches:
9-
- master
10-
pull_request:
11-
branches:
12-
- master
13-
2+
on: [push, pull_request]
143
jobs:
15-
test:
4+
Test:
165
strategy:
17-
fail-fast: false
6+
fail-fast: false
7+
max-parallel: 15
188
matrix:
199
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]
2111
os: [macos-latest, ubuntu-latest, windows-latest]
2212
runs-on: ${{ matrix.os }}
2313
steps:
@@ -37,30 +27,23 @@ jobs:
3727
run: |
3828
npm install --no-progress
3929
pip install flake8 pytest
40-
- name: Lint python
30+
- name: Set Windows environment
31+
if: matrix.os == 'windows-latest'
32+
run:
33+
echo '::set-env name=GYP_MSVS_VERSION::2015'
34+
echo '::set-env name=GYP_MSVS_OVERRIDE_PATH::C:\\Dummy'
35+
- name: Run Node tests
36+
run: |
37+
npm test
38+
- name: Lint Python
4139
if: matrix.os == 'ubuntu-latest'
4240
run: |
4341
# stop the build if there are Python syntax errors or undefined names
4442
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
4543
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
4644
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'
45+
- name: Run Python tests
5346
run: |
5447
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
48+
- name: Run doctests with pytest
49+
run: python -m pytest --doctest-modules

0 commit comments

Comments
 (0)