aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/python-tests.yml48
1 files changed, 27 insertions, 21 deletions
diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml
index 4c02a1db..3c2aca34 100644
--- a/.github/workflows/python-tests.yml
+++ b/.github/workflows/python-tests.yml
@@ -1,4 +1,6 @@
-name: Test suite
+name: >-
+ 👷
+ Test suite
on:
push:
@@ -8,7 +10,10 @@ on:
jobs:
tests:
- name: 👷
+ name: >-
+ ${{ matrix.python-version }}
+ /
+ ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
# max-parallel: 5
@@ -25,11 +30,10 @@ jobs:
- macOS-latest
# - windows-2019
# - windows-2016
- env:
- - TOXENV: python
env:
TOX_PARALLEL_NO_SPINNER: 1
+ TOXENV: python
steps:
- uses: actions/checkout@master
@@ -43,7 +47,10 @@ jobs:
- name: Log Python location
run: >-
which python
- - name: Cache pip
+ - name: Log Python env
+ run: >-
+ python -m sysconfig
+ - name: Pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
@@ -64,10 +71,13 @@ jobs:
- name: Log installed dists
run: >-
python -m pip freeze --all
+ - name: Adjust TOXENV for PyPy
+ if: startsWith(matrix.python-version, 'pypy')
+ run: >-
+ echo "::set-env name=TOXENV::${{ matrix.python-version }}"
- name: Log env vars
run: >-
env
- env: ${{ matrix.env }}
- name: Verify that there's no cached Python modules in sources
if: >-
@@ -76,20 +86,16 @@ jobs:
! grep pyc setuptools.egg-info/SOURCES.txt
- name: 'Initialize tox envs: ${{ matrix.env.TOXENV }}'
- run: |
- ${{ startsWith(matrix.os, 'windows-') && 'setx TOXENV ' || 'export TOXENV=' }}${{ ('2.7' == matrix.python-version && 'py27') || ('pypy2' == matrix.python-version && 'pypy2') || '$TOXENV' }}
- ${{ startsWith(matrix.os, 'macOS-') && 'pypy3' == matrix.python-version && 'export TOXENV=pypy3' || '' }}
- echo TOXENV="$TOXENV"
- python -m tox --parallel auto --notest --skip-missing-interpreters false
- env: ${{ matrix.env }}
+ run: >-
+ python -m
+ tox
+ --parallel auto
+ --notest
+ --skip-missing-interpreters false
- name: Test with tox
- run: |
- ${{ startsWith(matrix.os, 'windows-') && 'setx NETWORK_REQUIRED ' || 'export NETWORK_REQUIRED=' }}1
- ${{ startsWith(matrix.os, 'windows-') && 'setx TOXENV ' || 'export TOXENV=' }}${{ ('2.7' == matrix.python-version && 'py27') || ('pypy2' == matrix.python-version && 'pypy2') || '$TOXENV' }}
- ${{ startsWith(matrix.os, 'macOS-') && 'pypy3' == matrix.python-version && 'export TOXENV=pypy3' || '' }}
- echo TOXENV="$TOXENV"
- python -m tox \
- --parallel 0 \
- -- \
+ run: >-
+ python -m
+ tox
+ --parallel auto
+ --
--cov
- env: ${{ matrix.env }}