django-analytical/.github/workflows/test.yml
Jannis Leidel fb88f7495c
Update .github/workflows/test.yml
Co-authored-by: Peter Bittner <django@bittner.it>
2023-05-02 10:54:25 +02:00

58 lines
1.3 KiB
YAML

name: Test
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-20.04
strategy:
max-parallel: 5
fail-fast: false
matrix:
python-version:
- '3.6'
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11'
django-version:
- '3.2'
- '4.0'
exclude:
- { django-version: '4.1', python-version: '3.7' }
- { django-version: '4.2', python-version: '3.7' }
- { django-version: '3.2', python-version: '3.11' }
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip' # caching pip dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade tox tox-gh
- name: Setup test suite
run: tox4 r -vv --notest
- name: Tox tests (Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }})
run: tox4 r --skip-pkg-install
env:
DJANGO: ${{ matrix.django-version }}
- name: Upload coverage
uses: codecov/codecov-action@v1
with:
name: Python ${{ matrix.python-version }}