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
23 changes: 21 additions & 2 deletions .github/workflows/functional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ jobs:
- name: Run failover tests
run: bash tests/functional/test-failover.sh

- name: Run advanced failover tests
run: bash tests/functional/test-failover-advanced.sh

- name: Run named channels tests
run: bash tests/functional/test-named-channels.sh

Expand Down Expand Up @@ -166,6 +169,11 @@ jobs:
timeout-minutes: 30
needs: build

strategy:
fail-fast: false
matrix:
pg_version: ['15', '16', '17']

steps:
- uses: actions/checkout@v4

Expand All @@ -180,7 +188,10 @@ jobs:

- name: Start PostgreSQL containers
working-directory: tests/functional
env:
PG_IMAGE: postgres:${{ matrix.pg_version }}
run: |
echo "Using PostgreSQL image: $PG_IMAGE"
docker compose up -d pgprimary
echo "Waiting for pgprimary to be healthy..."
timeout 120 bash -c '
Expand Down Expand Up @@ -224,6 +235,8 @@ jobs:

- name: Start PostgreSQL orchestrator
working-directory: tests/functional
env:
PG_IMAGE: postgres:${{ matrix.pg_version }}
run: |
docker compose up -d orchestrator-pg
echo "Waiting for PostgreSQL orchestrator to be ready..."
Expand All @@ -244,29 +257,35 @@ jobs:
- name: Collect orchestrator logs
if: always()
working-directory: tests/functional
env:
PG_IMAGE: postgres:${{ matrix.pg_version }}
run: |
docker compose logs orchestrator-pg > /tmp/orchestrator-pg-test.log 2>&1 || true

- name: Upload orchestrator logs
if: always()
uses: actions/upload-artifact@v4
with:
name: orchestrator-test-logs-postgresql
name: orchestrator-test-logs-pg-${{ matrix.pg_version }}
path: /tmp/orchestrator-pg-test.log

- name: Collect all docker logs on failure
if: failure()
working-directory: tests/functional
env:
PG_IMAGE: postgres:${{ matrix.pg_version }}
run: docker compose logs > /tmp/docker-compose-logs.txt 2>&1 || true

- name: Upload docker logs on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: docker-compose-logs-postgresql
name: docker-compose-logs-pg-${{ matrix.pg_version }}
path: /tmp/docker-compose-logs.txt

- name: Cleanup
if: always()
working-directory: tests/functional
env:
PG_IMAGE: postgres:${{ matrix.pg_version }}
run: docker compose down -v --remove-orphans 2>/dev/null || true
4 changes: 2 additions & 2 deletions tests/functional/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ services:
- proxysql

pgprimary:
image: postgres:17
image: ${PG_IMAGE:-postgres:17}
hostname: pgprimary
environment:
POSTGRES_PASSWORD: testpass
Expand All @@ -118,7 +118,7 @@ services:
- pgprimary

pgstandby1:
image: postgres:17
image: ${PG_IMAGE:-postgres:17}
hostname: pgstandby1
environment:
POSTGRES_PASSWORD: testpass
Expand Down
Loading
Loading