Skip to content

Commit

Permalink
reduce diff with python_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
imatlopez committed Sep 2, 2020
1 parent 80aa6c4 commit 717e4c7
Showing 1 changed file with 18 additions and 34 deletions.
52 changes: 18 additions & 34 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,13 @@
# TODO: Line 20, enable python-version: 3.5
# TODO: Line 69, enable pytest --doctest-modules

name: Tests

on:
push:
branches:
- master
pull_request:
branches:
- master

on: [push, pull_request]
jobs:
test:
Test:
strategy:
fail-fast: false
fail-fast: false
max-parallel: 15
matrix:
node: [10.x, 12.x, 14.x]
python: [3.6, 3.7, 3.8]
python: [3.6, 3.7, 3.8, 3.9.0-rc.1]
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -37,30 +27,24 @@ jobs:
run: |
npm install --no-progress
pip install flake8 pytest
- name: Lint python
- name: Set Windows environment
if: matrix.os == 'windows-latest'
uses: allenevans/set-env@v1
with:
GYP_MSVS_VERSION: "2015"
GYP_MSVS_OVERRIDE_PATH: "C:\\Dummy"
- name: Run Node tests
run: |
npm test
- name: Lint Python
if: matrix.os == 'ubuntu-latest'
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run node tests (Linux and macOS)
if: matrix.os != 'windows-latest'
run: |
npm test
- name: Run python tests (Linux and macOS)
if: matrix.os != 'windows-latest'
- name: Run Python tests
run: |
python -m pytest
- name: Run node tests (Windows)
if: matrix.os == 'windows-latest'
shell: bash
run: |
GYP_MSVS_VERSION=2015 GYP_MSVS_OVERRIDE_PATH="C:\\Dummy" npm test
- name: Run python tests (Windows)
if: matrix.os == 'windows-latest'
shell: bash
run: |
GYP_MSVS_VERSION=2015 GYP_MSVS_OVERRIDE_PATH="C:\\Dummy" python -m pytest
# - name: Run doctests with pytest
# run: pytest --doctest-modules
- name: Run doctests with pytest
run: python -m pytest --doctest-modules

0 comments on commit 717e4c7

Please sign in to comment.