Support django 5.1 and python 3.13 #230
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Python package | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.9'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install flake8 | |
- name: Lint with flake8 | |
run: | | |
flake8 geostore test_geostore | |
build: | |
runs-on: ubuntu-latest | |
needs: [lint] | |
strategy: | |
matrix: | |
python-version: ['3.9', '3.10', '3.13'] | |
django-version: ['4.2.*', '5.1.*'] | |
postgis-image: ['postgis/postgis:12-2.5'] | |
exclude: | |
- python-version: '3.9' | |
django-version: '5.1.*' | |
include: | |
- postgis-image: 'postgis/postgis:13-2.5' | |
django-version: '5.1.*' | |
services: | |
postgres: | |
image: ${{ matrix.postgis-image }} | |
env: | |
POSTGRES_PASSWORD: travis_ci_test | |
POSTGRES_USER: travis_ci_test | |
POSTGRES_DB: travis_ci_test | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
sudo apt-get -q update && sudo apt-get -yqq install libproj-dev binutils gdal-bin libgdal-dev | |
python -m pip install --upgrade pip setuptools wheel | |
pip install .[dev] -U | |
if [[ ${{ matrix.django-version }} == dev ]]; then | |
pip install -e git+https://github.com/django/django@main#egg=django; | |
else | |
pip install Django==${{ matrix.django-version }} -U; | |
fi | |
- name: Check missing migrations | |
run: | | |
./manage.py makemigrations --check | |
- name: Test with coverage | |
run: | | |
coverage run ./manage.py test | |
coverage run -a ./manage.py test --settings=test_geostore.settings_with_customs geostore.tests.test_views.test_vector_tiles.VectorTilesTestCase.test_layer_tilejson_with_custom_hostnames | |
coverage run -a ./manage.py test --settings=test_geostore.settings_with_customs geostore.tests.test_custom_classes | |
coverage run -a ./manage.py test --settings=test_geostore.settings_with_customs geostore.tests.test_views.test_async_exports | |
coverage xml -o coverage.xml | |
- uses: codecov/codecov-action@v3 | |
with: | |
files: ./coverage.xml | |
fail_ci_if_error: true |