Skip to content

Add Django 5.1 support #90

Add Django 5.1 support

Add Django 5.1 support #90

Workflow file for this run

name: Test
on:
push:
branches:
- main
pull_request:
jobs:
server:
name: Test Python ${{ matrix.python }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: pip install tox
- name: Run tests
run: tox -f py$(echo ${{ matrix.python }} | tr -d .)
- name: Upload coverage
uses: actions/upload-artifact@v3
with:
name: coverage-data
path: '.coverage.*'
include-hidden-files: true
browser:
name: Test Browser ${{ matrix.browser }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
# no need for a py/dj matrix - tests are verifying clientside functionality
matrix:
browser: [ "chromium", "firefox", "webkit" ]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install dependencies
run: pip install tox
- name: Setup server
run: |
tox --devenv venv-py312 -e py312-dj51
source venv-py312/bin/activate
python dev/manage.py migrate
python dev/manage.py testdata
python dev/manage.py runserver &
- name: Run tests
run: tox -e playwright -- --browser ${{ matrix.browser }}
coverage:
name: Coverage (.py)
runs-on: ubuntu-latest
needs: server
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install dependencies
run: python -m pip install --upgrade coverage
- name: Download coverage
uses: actions/download-artifact@v3
with:
name: coverage-data
- name: Generate coverage
run: |
python -m coverage combine
python -m coverage html
python -m coverage report --fail-under=100 --show-missing
- name: Upload coverage
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: html-report
path: htmlcov