-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
running PG e2e tests on Postgres 12 too
- Loading branch information
1 parent
0900c31
commit 67ecd1f
Showing
1 changed file
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: Flow build and test [Postgres 12] | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
flow_test: | ||
strategy: | ||
matrix: | ||
runner: [ubicloud-standard-8-ubuntu-2204-arm] | ||
runs-on: ${{ matrix.runner }} | ||
timeout-minutes: 30 | ||
services: | ||
pg_cdc: | ||
image: imresamu/postgis:12-3.4-alpine | ||
ports: | ||
- 7132:5432 | ||
env: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_DB: postgres | ||
options: >- | ||
--name pg_cdc | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
steps: | ||
- name: checkout sources | ||
uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: ">=1.21.0" | ||
cache-dependency-path: flow/go.sum | ||
|
||
- name: install gotestsum | ||
run: | | ||
go install gotest.tools/gotestsum@latest | ||
- name: install lib-geos | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install libgeos-dev | ||
- name: download go modules | ||
run: | | ||
go mod download | ||
working-directory: ./flow | ||
|
||
- name: create hstore extension, increase logical replication limits, and setup catalog database | ||
run: > | ||
docker exec pg_cdc psql -h localhost -p 5432 -U postgres -c "CREATE EXTENSION hstore;" | ||
-c "ALTER SYSTEM SET wal_level=logical;" | ||
-c "ALTER SYSTEM SET max_replication_slots=192;" | ||
-c "ALTER SYSTEM SET max_wal_senders=256;" | ||
-c "ALTER SYSTEM SET max_connections=2048;" && | ||
(cat ../nexus/catalog/migrations/V{?,??}__* | docker exec -i pg_cdc psql -h localhost -p 5432 -U postgres) && | ||
docker restart pg_cdc | ||
working-directory: ./flow | ||
env: | ||
PG_CDC: empty | ||
PGPASSWORD: postgres | ||
|
||
- name: run tests | ||
run: | | ||
gotestsum --format testname -- -p 8 ./... -timeout 600s | ||
working-directory: ./flow/e2e/postgres | ||
env: | ||
PEERDB_CATALOG_HOST: localhost | ||
PEERDB_CATALOG_PORT: 7132 | ||
PEERDB_CATALOG_USER: postgres | ||
PEERDB_CATALOG_PASSWORD: postgres | ||
PEERDB_CATALOG_DATABASE: postgres | ||
PEERDB_CDC_IDLE_TIMEOUT_SECONDS: 10 |