mirror of
https://github.com/django/daphne.git
synced 2025-04-20 00:32:09 +03:00
Run tests on MacOS and Windows too
This commit is contained in:
parent
b96720390f
commit
899a29b56a
33
.github/workflows/tests.yml
vendored
33
.github/workflows/tests.yml
vendored
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user