Skip to content

Python Tests

Python Tests #182

Workflow file for this run

name: Python Tests
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: secret
POSTGRES_USER: wagtail_factories
POSTGRES_DB: wagtail_factories
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
strategy:
max-parallel: 4
matrix:
python-version:
- {version: 3.7, tox: 37}
- {version: 3.8, tox: 38}
- {version: 3.9, tox: 39}
- {version: '3.10', tox: 310}
- {version: '3.11', tox: 311}
django: [32, 40, 41]
wagtail: [41, 42, 50]
factoryboy: [32]
exclude:
- python-version: {version: 3.7, tox: 37}
django: 40
- python-version: {version: 3.7, tox: 37}
django: 41
- python-version: {version: '3.11', tox: 311}
django: 40
- python-version: {version: '3.11', tox: 311}
django: 32
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version.version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip tox
- name: Test with tox
env:
TEST_DB_NAME: wagtail_factories
TEST_DB_USER: wagtail_factories
TEST_DB_PASSWORD: secret
TOX_ENV: "py${{ matrix.python-version.tox }}-django${{ matrix.django }}-wagtail${{ matrix.wagtail }}-factoryboy${{ matrix.factoryboy }}"
run: |
tox -e $TOX_ENV