Skip to content

Ability to replay messages between time frame with new or existing rules + routes #78

Ability to replay messages between time frame with new or existing rules + routes

Ability to replay messages between time frame with new or existing rules + routes #78

Workflow file for this run

name: Integration Tests
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
actions: write
jobs:
copy_and_stream_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Build pg_flo
run: make build
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y postgresql-client jq
- name: Set up Docker Compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/v2.17.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Run copy and stream integration test
env:
PG_HOST: localhost
PG_PORT: 5433
PG_USER: myuser
PG_PASSWORD: mypassword
PG_DB: mydb
CI: true
run: |
docker-compose up -d
sleep 10
./internal/scripts/e2e_copy_and_stream.sh
docker-compose down -v
# - name: Upload test logs
# uses: actions/upload-artifact@v3
# if: always()
# with:
# name: copy-and-stream-test-logs
# path: |
# /tmp/pg_flo.log
# /tmp/pg_flo-output/*.jsonl
stream_only_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Build pg_flo
run: make build
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y postgresql-client jq
- name: Set up Docker Compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/v2.17.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Run stream only integration test
env:
PG_HOST: localhost
PG_PORT: 5433
PG_USER: myuser
PG_PASSWORD: mypassword
PG_DB: mydb
run: |
docker-compose up -d
sleep 10
./internal/scripts/e2e_test_stream.sh
docker-compose down -v
# - name: Upload test logs
# uses: actions/upload-artifact@v3
# if: always()
# with:
# name: stream-only-test-logs
# path: |
# /tmp/pg_flo.log
# /tmp/pg_flo-output/*.jsonl
resume_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Build pg_flo
run: make build
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y postgresql-client jq
- name: Set up Docker Compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/v2.17.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Run resume integration test
env:
PG_HOST: localhost
PG_PORT: 5433
PG_USER: myuser
PG_PASSWORD: mypassword
PG_DB: mydb
run: |
docker-compose up -d
sleep 10
./internal/scripts/e2e_resume.sh
docker-compose down -v
# - name: Upload test logs
# uses: actions/upload-artifact@v3
# if: always()
# with:
# name: resume-test-logs
# path: |
# /tmp/pg_flo.log
# /tmp/pg_flo-output/*.jsonl
transform_filter_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Build pg_flo
run: make build
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y postgresql-client jq
- name: Set up Docker Compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/v2.17.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Run transform and filter integration test
env:
PG_HOST: localhost
PG_PORT: 5433
PG_USER: myuser
PG_PASSWORD: mypassword
PG_DB: mydb
run: |
docker-compose up -d
sleep 10
./internal/scripts/e2e_transform_filter.sh
docker-compose down -v
# - name: Upload test logs
# uses: actions/upload-artifact@v3
# if: always()
# with:
# name: transform-filter-test-logs
# path: |
# /tmp/pg_flo.log
# /tmp/pg_flo-output/*.jsonl
ddl_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Build pg_flo
run: make build
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y postgresql-client jq
- name: Set up Docker Compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/v2.17.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Run DDL integration test
env:
PG_HOST: localhost
PG_PORT: 5433
PG_USER: myuser
PG_PASSWORD: mypassword
PG_DB: mydb
run: |
docker-compose up -d
sleep 10
./internal/scripts/e2e_ddl.sh
docker-compose down -v
# - name: Upload test logs
# uses: actions/upload-artifact@v3
# if: always()
# with:
# name: ddl-test-logs
# path: |
# /tmp/pg_flo.log
# /tmp/pg_flo-output/*.jsonl
postgres_sink_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Build pg_flo
run: make build
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y postgresql-client jq
- name: Set up Docker Compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/v2.17.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Run PostgreSQL sink integration test
env:
PG_HOST: localhost
PG_PORT: 5433
PG_USER: myuser
PG_PASSWORD: mypassword
PG_DB: mydb
TARGET_PG_HOST: localhost
TARGET_PG_PORT: 5434
TARGET_PG_USER: targetuser
TARGET_PG_PASSWORD: targetpassword
TARGET_PG_DB: targetdb
run: |
docker-compose up -d
sleep 10
./internal/scripts/e2e_postgres.sh
docker-compose down -v
# - name: Upload test logs
# uses: actions/upload-artifact@v3
# if: always()
# with:
# name: postgres-sink-test-logs
# path: |
# /tmp/pg_flo.log
# /tmp/pg_flo-output/*.jsonl
postgres_data_type_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Build pg_flo
run: make build
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y postgresql-client jq
- name: Set up Docker Compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/v2.17.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Run PostgreSQL data type integration test
env:
PG_HOST: localhost
PG_PORT: 5433
PG_USER: myuser
PG_PASSWORD: mypassword
PG_DB: mydb
TARGET_PG_HOST: localhost
TARGET_PG_PORT: 5434
TARGET_PG_USER: targetuser
TARGET_PG_PASSWORD: targetpassword
TARGET_PG_DB: targetdb
run: |
docker-compose up -d
sleep 10
./internal/scripts/e2e_postgres_data_type.sh
docker-compose down -v
# - name: Upload test logs
# uses: actions/upload-artifact@v3
# if: always()
# with:
# name: postgres-data-type-test-logs
# path: |
# /tmp/pg_flo.log
# /tmp/pg_flo-output/*.jsonl
multi_tenant_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Build pg_flo
run: make build
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y postgresql-client jq
- name: Set up Docker Compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/v2.17.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Run multi-tenant integration test
env:
PG_HOST: localhost
PG_PORT: 5433
PG_USER: myuser
PG_PASSWORD: mypassword
PG_DB: mydb
TARGET_PG_HOST: localhost
TARGET_PG_PORT: 5434
TARGET_PG_USER: targetuser
TARGET_PG_PASSWORD: targetpassword
TARGET_PG_DB: targetdb
run: |
docker-compose up -d
sleep 10
./internal/scripts/e2e_multi_tenant.sh
docker-compose down -v
# - name: Upload test logs
# uses: actions/upload-artifact@v3
# if: always()
# with:
# name: multi-tenant-test-logs
# path: |
# /tmp/pg_flo.log
# /tmp/pg_flo-output/*.jsonl
routing_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Build pg_flo
run: make build
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y postgresql-client jq
- name: Set up Docker Compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/v2.17.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Run routing integration test
env:
PG_HOST: localhost
PG_PORT: 5433
PG_USER: myuser
PG_PASSWORD: mypassword
PG_DB: mydb
TARGET_PG_HOST: localhost
TARGET_PG_PORT: 5434
TARGET_PG_USER: targetuser
TARGET_PG_PASSWORD: targetpassword
TARGET_PG_DB: targetdb
run: |
docker-compose up -d
sleep 10
./internal/scripts/e2e_routing.sh
docker-compose down -v
# - name: Upload test logs
# uses: actions/upload-artifact@v3
# if: always()
# with:
# name: routing-test-logs
# path: |
# /tmp/pg_flo.log
# /tmp/pg_flo-output/*.jsonl