Skip to content

Support Django 5.0, and 5.1; Python 3.12. (#106) #117

Support Django 5.0, and 5.1; Python 3.12. (#106)

Support Django 5.0, and 5.1; Python 3.12. (#106) #117

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
lint:
name: "Lint"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: "actions/setup-python@v3"
with:
python-version: "3.10"
- name: "Install dependencies"
run: python -m pip install pyupgrade==2.31.1 flake8==4.0.1 black==22.3.0 isort==5.10.1
- name: "Run pyupgrade"
run: pyupgrade --py38-plus **/*.py
- name: "Run flake8"
run: flake8
- name: "Run isort"
run: isort --check .
- name: "Run black"
run: black --check .
tests:
name: "Python ${{ matrix.python-version }}"
needs: lint
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v2
- uses: "actions/setup-python@v3"
with:
python-version: "${{ matrix.python-version }}"
- name: "Install dependencies"
run: |
set -xe
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade tox
- name: "Run tox targets for ${{ matrix.python-version }}"
env:
TOX_SKIP_ENV: ".*djangomain.*"
run: "python -m tox"
- name: "Run tox targets for ${{ matrix.python-version }} for django main"
env:
TOX_SKIP_ENV: ".*django[^m].*"
run: "python -m tox"
continue-on-error: true