Commit 673e62b2 authored by Sviatoslav Sydorenko's avatar Sviatoslav Sydorenko

Simplify GH Actions tests workflow

parent d83f1b86
name: Test suite name: >-
👷
Test suite
on: on:
push: push:
...@@ -8,7 +10,10 @@ on: ...@@ -8,7 +10,10 @@ on:
jobs: jobs:
tests: tests:
name: 👷 name: >-
${{ matrix.python-version }}
/
${{ matrix.os }}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
# max-parallel: 5 # max-parallel: 5
...@@ -25,11 +30,10 @@ jobs: ...@@ -25,11 +30,10 @@ jobs:
- macOS-latest - macOS-latest
# - windows-2019 # - windows-2019
# - windows-2016 # - windows-2016
env:
- TOXENV: python
env: env:
TOX_PARALLEL_NO_SPINNER: 1 TOX_PARALLEL_NO_SPINNER: 1
TOXENV: python
steps: steps:
- uses: actions/checkout@master - uses: actions/checkout@master
...@@ -43,7 +47,10 @@ jobs: ...@@ -43,7 +47,10 @@ jobs:
- name: Log Python location - name: Log Python location
run: >- run: >-
which python which python
- name: Cache pip - name: Log Python env
run: >-
python -m sysconfig
- name: Pip cache
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ~/.cache/pip path: ~/.cache/pip
...@@ -64,10 +71,13 @@ jobs: ...@@ -64,10 +71,13 @@ jobs:
- name: Log installed dists - name: Log installed dists
run: >- run: >-
python -m pip freeze --all 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 - name: Log env vars
run: >- run: >-
env env
env: ${{ matrix.env }}
- name: Verify that there's no cached Python modules in sources - name: Verify that there's no cached Python modules in sources
if: >- if: >-
...@@ -76,20 +86,16 @@ jobs: ...@@ -76,20 +86,16 @@ jobs:
! grep pyc setuptools.egg-info/SOURCES.txt ! grep pyc setuptools.egg-info/SOURCES.txt
- name: 'Initialize tox envs: ${{ matrix.env.TOXENV }}' - name: 'Initialize tox envs: ${{ matrix.env.TOXENV }}'
run: | run: >-
${{ startsWith(matrix.os, 'windows-') && 'setx TOXENV ' || 'export TOXENV=' }}${{ ('2.7' == matrix.python-version && 'py27') || ('pypy2' == matrix.python-version && 'pypy2') || '$TOXENV' }} python -m
${{ startsWith(matrix.os, 'macOS-') && 'pypy3' == matrix.python-version && 'export TOXENV=pypy3' || '' }} tox
echo TOXENV="$TOXENV" --parallel auto
python -m tox --parallel auto --notest --skip-missing-interpreters false --notest
env: ${{ matrix.env }} --skip-missing-interpreters false
- name: Test with tox - name: Test with tox
run: | run: >-
${{ startsWith(matrix.os, 'windows-') && 'setx NETWORK_REQUIRED ' || 'export NETWORK_REQUIRED=' }}1 python -m
${{ startsWith(matrix.os, 'windows-') && 'setx TOXENV ' || 'export TOXENV=' }}${{ ('2.7' == matrix.python-version && 'py27') || ('pypy2' == matrix.python-version && 'pypy2') || '$TOXENV' }} tox
${{ startsWith(matrix.os, 'macOS-') && 'pypy3' == matrix.python-version && 'export TOXENV=pypy3' || '' }} --parallel auto
echo TOXENV="$TOXENV" --
python -m tox \
--parallel 0 \
-- \
--cov --cov
env: ${{ matrix.env }}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment