Skip to content

support django 5.1 #279

support django 5.1

support django 5.1 #279

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
DATABASE_USER: postgres
DATABASE_PASSWORD: postgres
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install package dependencies
run: |
sudo apt-get install -y gdal-bin
- name: install poetry
run: |
pip install pipx && pipx install poetry~=1.6
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: install python dependencies
run: |
poetry install --no-interaction
- name: run linters via pre-commit
run: |
poetry run pre-commit run --all --show-diff-on-failure --color=always
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
django-version: ["4.2", "5.0", "5.1"]
postgres-version: ["12-2.5", "13-3.4"]
exclude:
- django-version: "5.1"
python-version: "3.8"
- django-version: "5.0"
python-version: "3.8"
- django-version: "5.1"
python-version: "3.9"
- django-version: "5.0"
postgres-version: "12-2.5"
- django-version: "5.0"
python-version: "3.9"
services:
postgresql:
image: postgis/postgis:${{ matrix.postgres-version }}
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: heroku_connect_test
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- name: Install package dependencies
run: |
sudo apt-get install -y gdal-bin
- name: install poetry
run: |
pip install pipx && pipx install poetry
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: install python dependencies
run: |
poetry install --no-interaction
- name: override initial django installation
run: |
poetry run pip install Django~=${{ matrix.django-version }}
- name: run tests
run: |
poetry run coverage run --source=heroku_connect -m 'pytest'
poetry run coverage xml
- name: upload coverage to codecov
if: ${{ !github.event.pull_request.head.repo.fork && !(github.event_name == 'pull_request' && github.event.pull_request.user.login == 'dependabot[bot]') }}
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: false
files: coverage.xml