Run tests on MacOS and Windows too

This commit is contained in:
Michael Käufl 2020-10-21 09:22:14 +02:00
parent b96720390f
commit 899a29b56a
2 changed files with 25 additions and 11 deletions

View File

@ -3,20 +3,30 @@ name: Tests
on:
push:
branches:
- master
- master
pull_request:
jobs:
tests:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os:
- macos
- windows
- ubuntu
python-version:
- 3.6
- 3.7
- 3.8
- 3.9
- 3.6
- 3.7
- 3.8
- 3.9
exclude:
# Jobs fail on Windows if there's no wheel for twisted
- os: windows
python-version: 3.8
- os: windows
python-version: 3.9
steps:
- uses: actions/checkout@v2
@ -26,11 +36,14 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel setuptools tox
- name: Run tox targets for ${{ matrix.python-version }}
python -m pip install --upgrade pip wheel setuptools tox tox-factor
- name: Set pyversion for tox
run: |
ENV_PREFIX=$(tr -C -d "0-9" <<< "${{ matrix.python-version }}")
TOXENV=$(tox --listenvs | grep "^py$ENV_PREFIX" | tr '\n' ',') python -m tox
python -c "import sys; print('::set-output name=PYV::', ''.join([str(x) for x in sys.version_info[:2]]), sep='')"
id: pyversion
- name: Run tox targets for Python ${{ matrix.python-version }} on ${{ matrix.os }}
run: |
python -m tox -f py${{ steps.pyversion.outputs.PYV }}-${{ matrix.os }}
lint:
runs-on: ubuntu-latest

View File

@ -1,6 +1,7 @@
[tox]
envlist =
py{36,37,38,39}-twisted{187,latest}
py{36,37,38,39}-twisted{187,latest}-{ubuntu,macos}
py{36,37}-twistedlatest-windows
qa
[testenv]