Skip to content

Add support for Django 5.x #22

Add support for Django 5.x

Add support for Django 5.x #22

Workflow file for this run

name: Django CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.8, 3.9, "3.10", "3.11"]
dj-version: ["3.2.*", "4.0.*", "4.1.*", "4.2.*", "5.0.*", "5.1.*"]
psycopg: ["psycopg2", "psycopg[binary,pool]"]
exclude:
- dj-version: "5.0.*"
python-version: 3.8
- dj-version: "5.0.*"
python-version: 3.9
- dj-version: "5.1.*"
python-version: 3.8
- dj-version: "5.1.*"
python-version: 3.9
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: local
POSTGRES_PASSWORD: dev
POSTGRES_DB: django_audimatic
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install 'django==${{ matrix.dj-version }}'
pip install ${{ matrix.psycopg }}
- name: Run Tests
run: |
DATABASE_URL=psql://local:dev@localhost:5432/django_audimatic coverage run -p manage.py migrate
DATABASE_URL=psql://local:dev@localhost:5432/django_audimatic coverage run -p manage.py behave
coverage combine
- name: Upload coverage data to coveralls.io
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: ${{ join(matrix.*, '-') }}
COVERALLS_PARALLEL: true
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
coveralls:
name: Indicate completion to coveralls.io
needs: test
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Finished
run: |
pip3 install --upgrade coveralls
coveralls --service=github --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}