Skip to content

Commit

Permalink
Merge pull request #6 from octoenergy/postgres-ci-matrix
Browse files Browse the repository at this point in the history
Run multiple versions of PostgreSQL in CI build matrix
  • Loading branch information
meshy authored Feb 13, 2024
2 parents f0ad715 + 125ec15 commit 7fadd85
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
29 changes: 19 additions & 10 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,18 @@ jobs:
runs-on: ubuntu-22.04
timeout-minutes: 5

strategy:
matrix:
postgres-image:
- "postgres:12"
- "postgres:13"
- "postgres:14"
- "postgres:15"
- "postgres:16"

services:
postgres:
image: postgres
image: ${{ matrix.postgres-image }}
env:
POSTGRES_PASSWORD: postgres
options: >-
Expand All @@ -24,23 +33,23 @@ jobs:
ports:
- 5432:5432

strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]

steps:
- name: Clone the code
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python versions
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: |
3.12
3.11
3.10
cache: 'pip'

- name: Install requirements
run: make install
- name: Install tox
run: pip install tox

- name: Run the tests
run: tox
run: tox --parallel --parallel-no-spinner --skip-missing-interpreters=false
env:
DATABASE_URL: postgres://postgres:postgres@localhost/django_integrity
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ This package is tested against:

- Python 3.10, 3.11, or 3.12.
- Django 4.1, 4.2, or 5.0.
- PostgreSQL 12 to 16

## Local development

Expand Down

0 comments on commit 7fadd85

Please sign in to comment.