Skip to content

Ensure all the required fields are populated in the html report for new flattened issues approach #1889

Ensure all the required fields are populated in the html report for new flattened issues approach

Ensure all the required fields are populated in the html report for new flattened issues approach #1889

Workflow file for this run

name: "PG 9: Migration Tests"
on:
push:
branches: ['main', '*.*-dev', '*.*.*-dev']
pull_request:
branches: ['main']
jobs:
run-pg-9-migration-tests:
strategy:
matrix:
version: [2024.2.0.0-b145]
BETA_FAST_DATA_EXPORT: [0, 1]
env:
BETA_FAST_DATA_EXPORT: ${{ matrix.BETA_FAST_DATA_EXPORT }}
runs-on: ubuntu-22.04
services:
postgres:
image: postgres:9
env:
POSTGRES_PASSWORD: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
# https://github.com/actions/setup-java
with:
distribution: "temurin"
java-version: "17"
check-latest: true
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: "Enable postgres with wal_level as logical"
run: |
docker exec ${{ job.services.postgres.id }} sh -c "echo 'wal_level=logical' >> /var/lib/postgresql/data/postgresql.conf"
docker restart ${{ job.services.postgres.id }}
sleep 10
# if: matrix.BETA_FAST_DATA_EXPORT == 1
- name: Install python3 and psycopg2
run: |
sudo apt install -y python3
sudo apt install -y libpq-dev
sudo apt install python3-psycopg2
- name: Run installer script to setup voyager
run: |
cd installer_scripts
yes | ./install-yb-voyager --install-from-local-source --only-pg-support
sudo rm /usr/bin/pg_dump
sudo ln -s /usr/lib/postgresql/17/bin/pg_dump /usr/bin/pg_dump
sudo rm /usr/bin/pg_restore
sudo ln -s /usr/lib/postgresql/17/bin/pg_restore /usr/bin/pg_restore
pg_dump --version
pg_restore --version
psql --version
env:
ON_INSTALLER_ERROR_OUTPUT_LOG: Y
- name: Test PostgreSQL Connection
run: |
psql "postgresql://postgres:[email protected]:5432/postgres" -c "SELECT version();"
- name: Create PostgreSQL user
run: |
./migtests/scripts/postgresql/create_pg_user
- name: Start YugabyteDB cluster
run: |
docker run -d --name yugabytedb \
-p7000:7000 -p9000:9000 -p15433:15433 -p5433:5433 -p9042:9042 \
yugabytedb/yugabyte:${{ matrix.version }} \
bin/yugabyted start --background=false --ui=false
sleep 20
- name: Test YugabyteDB connection
run: |
psql "postgresql://yugabyte:@127.0.0.1:5433/yugabyte" -c "SELECT version();"
- name: Create YugabyteDB user
run: |
./migtests/scripts/yugabytedb/create_yb_user
- name: Enable yb-tserver-n1 and yb-master-n1 name resolution
run: |
echo "127.0.0.1 yb-tserver-n1" | sudo tee -a /etc/hosts
echo "127.0.0.1 yb-master-n1" | sudo tee -a /etc/hosts
psql "postgresql://yugabyte@yb-tserver-n1:5433/yugabyte" -c "SELECT version();"
- name: "TEST: pg-case-sensitivity-single-table"
if: ${{ !cancelled() }}
run: migtests/scripts/run-test-export-data.sh pg/case-sensitivity-single-table
- name: "TEST: pg-datatypes"
if: ${{ !cancelled() }}
run: migtests/scripts/run-test.sh pg/datatypes
- name: "TEST: pg-constraints"
if: ${{ !cancelled() }}
run: migtests/scripts/run-test.sh pg/constraints