mirror of
https://github.com/jazzband/django-analytical.git
synced 2026-03-16 22:20:25 +00:00
See: - https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ - https://github.com/actions/setup-python#caching-packages-dependencies - https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#caching-packages
58 lines
1.2 KiB
YAML
58 lines
1.2 KiB
YAML
name: Test
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
env:
|
|
PIP_DISABLE_PIP_VERSION_CHECK: '1'
|
|
PY_COLORS: '1'
|
|
|
|
jobs:
|
|
python-django:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
max-parallel: 5
|
|
matrix:
|
|
python-version:
|
|
- '3.10'
|
|
- '3.11'
|
|
- '3.12'
|
|
- '3.13'
|
|
django-version:
|
|
- '4.2'
|
|
- '5.1'
|
|
- '5.2'
|
|
include:
|
|
- { python-version: '3.9', django-version: '4.2' }
|
|
exclude:
|
|
- { python-version: '3.13', django-version: '4.2' }
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
cache: pip
|
|
cache-dependency-path: |
|
|
**/pyproject.toml
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install tox tox-gh-actions
|
|
|
|
- name: Tox tests (Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }})
|
|
run: tox
|
|
env:
|
|
DJANGO: ${{ matrix.django-version }}
|
|
|
|
- name: Upload coverage
|
|
uses: codecov/codecov-action@v5
|
|
with:
|
|
name: Python ${{ matrix.python-version }}
|