ParadeDB CI/CD automates building, testing, and deploying a PostgreSQL instance running the ParadeDB extension across environments.
Automated pipelines catch schema issues early, guarantee extension compatibility, and ship new search features to prod with one click.
GitHub Actions, GitLab CI, and CircleCI all run ParadeDB in Docker images. Use Flyway or sqitch for migrations and pgTAP for tests.
# Dockerfile
FROM paradedb/paradedb:latest
ENV POSTGRES_PASSWORD=postgres
COPY ./sql /docker-entrypoint-initdb.d
Place migration scripts in sql/
. The image auto-executes them on start.
# .github/workflows/ci.yml
name: ParadeDB CI
on: [push]
jobs:
test:
runs-on: ubuntu-latest
services:
db:
image: paradedb/paradedb:latest
ports: ["5432:5432"]
env:
POSTGRES_PASSWORD: postgres
steps:
- uses: actions/checkout@v3
- name: Install psql
run: sudo apt-get install -y postgresql-client
- name: Run migrations
run: psql -h localhost -U postgres -f sql/001_init.sql
- name: Run pgTAP tests
run: psql -h localhost -U postgres -f test/all_tests.sql
The pipeline builds, migrates, and runs unit tests on every push.
Add a deploy
job triggered on main
merges that runs the same migrations against the prod database using a secret connection string.
Set PARADEDB_MAX_MEMORY
and PARADEDB_MAX_WORKERS
via ALTER SYSTEM SET
in a migration file to keep prod and staging identical.
Wrap CREATE EXTENSION paradedb
and config changes in a single transaction to avoid partial deploys.
Load small product catalogs or test customers inside the pipeline so integration tests mimic production queries.
Yes, but separate containers improve scaling and isolate resource spikes from intensive search queries.
Yes. Grant superuser in the CI container or use a privileged role just for the installation migration.
Use transactional migrations plus ON_ERROR_STOP=1
so CI fails early. Rollbacks in production can be handled by Flyway undo scripts.