Skip to content
Merged
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
8 changes: 6 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,12 @@ jobs:

postgres-test:
runs-on: ubuntu-22.04
name: postgresql build + test
name: postgresql ${{ matrix.postgres_tag }} build + test
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
postgres_tag: ['17', '15']

steps:

Expand All @@ -250,7 +254,7 @@ jobs:
submodules: true

- name: build and start postgresql container
run: make postgres-docker-rebuild
run: POSTGRES_TAG=${{ matrix.postgres_tag }} make postgres-docker-rebuild

- name: wait for postgresql to be ready
run: |
Expand Down
8 changes: 5 additions & 3 deletions docker/postgresql/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# PostgreSQL Docker image with CloudSync extension pre-installed
FROM postgres:17
ARG POSTGRES_TAG=17
FROM postgres:${POSTGRES_TAG}

# Install build dependencies
# Derive the major version from PG_MAJOR (set by the official postgres image)
# and install the matching server-dev package
RUN apt-get update && apt-get install -y \
build-essential \
postgresql-server-dev-17 \
postgresql-server-dev-${PG_MAJOR} \
git \
make \
&& rm -rf /var/lib/apt/lists/*
Expand Down
2 changes: 2 additions & 0 deletions docker/postgresql/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ services:
build:
context: ../..
dockerfile: docker/postgresql/Dockerfile
args:
POSTGRES_TAG: ${POSTGRES_TAG:-17}
container_name: cloudsync-postgres
environment:
POSTGRES_USER: postgres
Expand Down
3 changes: 2 additions & 1 deletion test/postgresql/01_unittest.sql
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ CREATE EXTENSION IF NOT EXISTS cloudsync;

-- 'Test version visibility'
SELECT cloudsync_version() AS version \gset
\echo [PASS] (:testid) Test cloudsync_version: :version
SELECT current_setting('server_version') AS pg_version \gset
\echo [PASS] (:testid) Test cloudsync_version: :version (PostgreSQL :pg_version)

-- Test uuid generation
SELECT cloudsync_uuid() AS uuid1 \gset
Expand Down
Loading