Skip to content

Commit 717e4c7

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

File tree

1 file changed

+18
-34
lines changed

1 file changed

+18
-34
lines changed

.github/workflows/tests.yml

+18-34
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,24 @@ 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+
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
4140
if: matrix.os == 'ubuntu-latest'
4241
run: |
4342
# stop the build if there are Python syntax errors or undefined names
4443
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
4544
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
4645
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
5347
run: |
5448
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

Comments
 (0)