Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
postgres-version: ["14", "17"]

steps:
- name: Check out code
Expand All @@ -31,9 +32,9 @@ jobs:

- name: Spin up DB in background
run: |
docker-compose pull db
docker-compose build db
docker-compose up -d db
PG_VERSION=${{ matrix.postgres-version }} docker-compose pull db
PG_VERSION=${{ matrix.postgres-version }} docker-compose build db
PG_VERSION=${{ matrix.postgres-version }} docker-compose up -d db

- name: Wait for DB to be ready
run: |
Expand Down Expand Up @@ -64,7 +65,7 @@ jobs:

- name: Stop services
if: always()
run: docker-compose down
run: PG_VERSION=${{ matrix.postgres-version }} docker-compose down


lint-ruff:
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,4 @@ For instructions on installing `pg_cron`, see the [pg_cron documentation](https:

## Compatibility

`django-pgcron` is compatible with Python 3.10 - 3.13, Django 5.0+, and Postgres 13 - 17.

`django-pgcron` is compatible with Python 3.10 - 3.13, Django 5.0+, and Postgres 14 - 17.
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ services:
build:
context: ./docker/postgres
dockerfile: Dockerfile
args:
- PG_VERSION=${PG_VERSION:-17}
volumes:
- ./.db:/var/lib/postgresql/data
environment:
Expand Down
7 changes: 4 additions & 3 deletions docker/postgres/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM postgres:17-alpine
ARG PG_VERSION=17
FROM postgres:${PG_VERSION}-alpine

# Install everything needed, including clang/llvm
RUN apk add --no-cache \
Expand All @@ -8,7 +9,7 @@ RUN apk add --no-cache \
clang \
llvm \
musl-dev \
postgresql17-dev \
postgresql${PG_VERSION}-dev \
curl

# Build pg_cron
Expand All @@ -20,7 +21,7 @@ RUN curl -L https://github.com/citusdata/pg_cron/archive/v1.6.4.tar.gz | tar xz
rm -rf pg_cron-1.6.4

# remove build tools to reduce image size
RUN apk del git make gcc clang llvm musl-dev postgresql17-dev
RUN apk del git make gcc clang llvm musl-dev postgresql${PG_VERSION}-dev

COPY init-pgcron.sh /docker-entrypoint-initdb.d/
RUN chmod +x /docker-entrypoint-initdb.d/init-pgcron.sh
1 change: 0 additions & 1 deletion pgcron/tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from django.core import management

import pgcron
import pgcron._jobs
from pgcron import _registry
from pgcron.models import Job

Expand Down
Loading