Skip to content

Hid unnecessary pg-16 install information in ubuntu installation in the installer script #108

Hid unnecessary pg-16 install information in ubuntu installation in the installer script

Hid unnecessary pg-16 install information in ubuntu installation in the installer script #108

Workflow file for this run

name: "Misc: Migration Tests"
on:
push:
branches: ['main']
pull_request:
branches: ['main']
jobs:
run-misc-migration-tests:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:13
env:
POSTGRES_PASSWORD: secret
# 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: Install python3 and psycopg2
run: |
sudo apt install -y python3
sudo apt install -y libpq-dev
sudo pip3 install psycopg2
- name: Run installer script to setup voyager
run: |
cd installer_scripts
yes | ./install-yb-voyager --install-from-local-source --only-pg-support
env:
ON_INSTALLER_ERROR_OUTPUT_LOG: Y
- name: Test PostgreSQL Connection
run: |
psql "postgresql://postgres:secret@127.0.0.1:5432/postgres" -c "SELECT version();"
- name: Create PostgreSQL user
run: |
./migtests/scripts/postgresql/create_pg_user
- name: "TEST: Assessment Report Test"
run: migtests/scripts/run-validate-assessment-report.sh pg/assessment-report-test
- name: "TEST: analyze-schema"
run: migtests/tests/analyze-schema/run-analyze-schema-test
- name: Run import data file tests on different YugabyteDB versions
env:
GCS_CLIENT_ID: ${{ secrets.PGUPTA_GCS_CLIENT_ID }}
GCS_CLIENT_SECRET: ${{ secrets.PGUPTA_GCS_CLIENT_SECRET }}
GCS_REFRESH_TOKEN: ${{ secrets.PGUPTA_GCS_REFRESH_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.RAHULB_S3_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.RAHULB_S3_SECRET_ACCESS_KEY }}
run: |
versions=("2.20.5.0-b72" "2.21.1.0-b271" "2024.1.1.0-b137")
for version in "${versions[@]}"; do
echo "Running tests on version $version"
echo "Start YugabyteDB cluster"
docker pull yugabytedb/yugabyte:$version
VERSION=$version docker compose -f migtests/setup/yb-docker-compose.yaml up -d
sleep 20
echo "Test YugabyteDB connection"
psql "postgresql://yugabyte:@127.0.0.1:5433/yugabyte" -c "SELECT version();"
echo "Create YugabyteDB user"
./migtests/scripts/yugabytedb/create_yb_user
echo "Enable yb-tserver-n1 and yb-master-n1 name resolution"
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();"
echo "Setup the gcp credentials"
migtests/scripts/gcs/create_gcs_credentials_file
echo "TEST: import-data-file"
migtests/tests/import-file/run-import-file-test
echo "Stop the cluster before the next iteration"
VERSION=$version docker compose -f migtests/setup/yb-docker-compose.yaml down --volumes
docker network prune -f
done
shell: bash