Skip to content

Wagtail 6.0

Wagtail 6.0 #224

Workflow file for this run

name: Run tests, lint and publish
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
wagtail-version: ["5.2", "6.2", "6.3"]
django-version: ["4.2", "5.0", "5.1"]
exclude:
- python-version: "3.13"
django-version: "4.2"
- python-version: "3.13"
django-version: "5.0"
- python-version: "3.9"
django-version: "5.0"
- python-version: "3.9"
django-version: "5.1"
- wagtail-version: "5.2"
django-version: "5.1"
- wagtail-version: "6.2"
django-version: "5.1"
services:
postgres:
image: postgis/postgis:13-3.4
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
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: |
set -xe
sudo apt-get update
sudo apt-get install gdal-bin libgdal-dev
python -m pip install --upgrade pip
pip install .[test]
pip install psycopg2-binary>=2.9.3
- name: Install wagtail ${{ matrix.wagtail-version }}
run: pip install wagtail==${{ matrix.wagtail-version }}
- name: Run tests
run: |
pytest
env:
DATABASE_NAME: postgres
DATABASE_USER: postgres
DATABASE_PASSWORD: postgres
DATABASE_HOST: localhost
DATABASE_PORT: 5432
GOOGLE_MAPS_V3_APIKEY: X
lint-black:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- uses: psf/black@stable
with:
options: "--check --verbose"
src: "."
version: "22.3.0"
lint-isort:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install isort
isort . --check-only
publish:
runs-on: ubuntu-latest
needs: [test, lint-black, lint-isort]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build
run: |
python -m build
- name: Release to Test PyPi
if: startsWith(github.ref, 'refs/tags/testv')
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}
TWINE_REPOSITORY_URL: https://test.pypi.org/legacy/
run: |
twine upload -r testpypi dist/*
- name: Release to PyPi
if: startsWith(github.ref, 'refs/tags/v')
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload dist/*