postgres test matrix #67
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 single version of Python | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Test | |
on: | |
push: | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10", "3.11"] | |
django-version: ["4.0", "4.1", "4.2", "5.0", "5.1"] | |
exclude: | |
# Django 5.0+ requires Python 3.10+ | |
- python-version: "3.9" | |
django-version: "5.0" | |
- python-version: "3.9" | |
django-version: "5.1" | |
max-parallel: 5 | |
services: | |
postgres: | |
image: postgres:13 | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install -r dev-requirements.txt | |
pip install Django==${{ matrix.django-version }} | |
- name: Run tests | |
run: | | |
./check-lint.sh | |
python manage.py test -v 3 --no-input |