Repository navigation
Organize & improve pyproject-fmt settings #136
Workflow file for this run
This file contains hidden or 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
| name: "Tests" | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: ~ | |
| permissions: {} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| # renovate: datasource=pypi depName=uv | |
| UV_VERSION: 0.12.13 | |
| jobs: | |
| run-tests: | |
| name: Test (Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }}, Elasticsearch ${{ matrix.elastic-version | |
| }}, DRF ${{ matrix.drf-version }}) | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| django-version: | |
| - "5.2.*" | |
| - "6.0.*" | |
| - "6.1.*" | |
| - "main" | |
| python-version: | |
| - "3.11" | |
| - "3.12" | |
| - "3.13" | |
| - "3.14" | |
| elastic-version: | |
| - "7.17.29" | |
| drf-version: | |
| - "3.16.*" | |
| - "3.17.*" | |
| - "3.18.*" | |
| exclude: | |
| # Django 6.0 support added in DRF 3.17.0 | |
| # https://www.django-rest-framework.org/community/release-notes/#3170 | |
| - drf-version: "3.16.*" | |
| django-version: "6.0.*" | |
| # Django 6.0 doesn't support Python 3.11 | |
| # https://docs.djangoproject.com/en/6.0/faq/install/#what-python-version-can-i-use-with-django | |
| - django-version: "6.0.*" | |
| python-version: "3.11" | |
| # DRF <3.18 doesn't support Django 6.1 | |
| - drf-version: "3.16.*" | |
| django-version: "6.1.*" | |
| - drf-version: "3.17.*" | |
| django-version: "6.1.*" | |
| # DRF <3.18 doesn't support the unreleased Django main branch | |
| - drf-version: "3.16.*" | |
| django-version: "main" | |
| - drf-version: "3.17.*" | |
| django-version: "main" | |
| # Django 6.1 doesn't support Python 3.11 | |
| - django-version: "6.1.*" | |
| python-version: "3.11" | |
| # Django main doesn't support Python 3.11 | |
| - django-version: "main" | |
| python-version: "3.11" | |
| env: | |
| UV_NO_DEV: 1 | |
| ELASTICSEARCH_VERSION: ${{ matrix.elastic-version }} | |
| PYTHONUNBUFFERED: 1 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Install uv ${{ env.UV_VERSION }} & Python ${{ matrix.python-version }} | |
| uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0 | |
| with: | |
| enable-cache: true | |
| python-version: ${{ matrix.python-version }} | |
| version: ${{ env.UV_VERSION }} | |
| - name: Install GDAL | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends gdal-bin | |
| - name: Start Elasticsearch | |
| run: docker compose up -d --quiet-pull --wait elasticsearch | |
| - name: Setup project and install dependencies | |
| run: uv sync | |
| - name: Verify package builds | |
| run: uv build | |
| - name: Install matrix deps | |
| env: | |
| DJANGO_VERSION: ${{ matrix.django-version }} | |
| DRF_VERSION: ${{ matrix.drf-version }} | |
| run: | | |
| if [[ "${DJANGO_VERSION}" == "main" ]]; then | |
| uv pip install -U "django @ git+https://github.com/django/django.git@main" "djangorestframework==${DRF_VERSION}" | |
| else | |
| uv pip install -U "django==${DJANGO_VERSION}" "djangorestframework==${DRF_VERSION}" | |
| fi | |
| - name: Run tests | |
| run: uv run --no-sync manage.py test tests |