forked from babelfish-for-postgresql/babelfish_extensions
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
560 additions
and
15 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
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 |
---|---|---|
@@ -1,13 +1,20 @@ | ||
name: 'Run JDBC Tests' | ||
description: 'Run Babel JDBC test framework' | ||
|
||
inputs: | ||
input_dir: | ||
description: 'Test input directory' | ||
required: no | ||
default: input | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Run JDBC Tests | ||
run: | | ||
export PATH=~/${{env.INSTALL_DIR}}/bin:$PATH | ||
export PG_SRC=~/work/babelfish_extensions/postgresql_modified_for_babelfish | ||
export inputFilesPath=${{inputs.input_dir}} | ||
cd test/JDBC/ | ||
mvn test | ||
shell: bash |
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
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,110 @@ | ||
name: Logical Replication Test | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
run-logical-replication-tests: | ||
env: | ||
INSTALL_DIR: psql | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
id: checkout | ||
|
||
- name: Install Dependencies | ||
id: install-dependencies | ||
if: always() | ||
uses: ./.github/composite-actions/install-dependencies | ||
|
||
- name: Build Modified Postgres | ||
id: build-modified-postgres | ||
if: always() && steps.install-dependencies.outcome == 'success' | ||
uses: ./.github/composite-actions/build-modified-postgres | ||
with: | ||
install_dir: 'psql' | ||
code_coverage: 'yes' | ||
|
||
- name: Compile ANTLR | ||
id: compile-antlr | ||
if: always() && steps.build-modified-postgres.outcome == 'success' | ||
uses: ./.github/composite-actions/compile-antlr | ||
|
||
- name: Build Extensions | ||
id: build-extensions | ||
if: always() && steps.compile-antlr.outcome == 'success' | ||
uses: ./.github/composite-actions/build-extensions | ||
|
||
- name: Build tds_fdw Extension | ||
id: build-tds_fdw-extension | ||
if: always() && steps.build-extensions.outcome == 'success' | ||
uses: ./.github/composite-actions/build-tds_fdw-extension | ||
|
||
- name: Build PostGIS Extension | ||
id: build-postgis-extension | ||
if: always() && steps.build-tds_fdw-extension.outcome == 'success' | ||
uses: ./.github/composite-actions/build-postgis-extension | ||
|
||
- name: Start Publisher server | ||
id: start-publisher | ||
if: always() && steps.build-postgis-extension.outcome == 'success' | ||
uses: ./.github/composite-actions/install-extensions | ||
|
||
- name: Start Subscriber server | ||
id: start-subscriber | ||
if: always() && steps.start-publisher.outcome == 'success' | ||
uses: ./.github/composite-actions/install-extensions | ||
with: | ||
psql_port: 5433 | ||
tsql_port: 8199 | ||
|
||
- name: Setup Publication and Subscription | ||
id: setup-pub-sub | ||
if: always() && steps.start-subscriber.outcome == 'success' | ||
run: | | ||
~/${{inputs.install_dir}}/bin/psql -d jdbc_testdb -U runner -c "CREATE PUBLICATION my_pub;" | ||
~/${{inputs.install_dir}}/bin/psql -d jdbc_testdb -U runner -p 5433 -c "CREATE SUBSCRIPTION my_sub CONNECTION 'host=localhost port=5432 user=jdbc_user dbname=jdbc_testdb password=12345678' PUBLICATION my_pub;" | ||
- name: Run Replication Tests | ||
id: replication | ||
if: always() && steps.setup-pub-sub.outcome == 'success' | ||
timeout-minutes: 60 | ||
uses: ./.github/composite-actions/run-jdbc-tests | ||
with: | ||
input_dir: 'replication' | ||
|
||
- name: Upload Log | ||
if: always() && steps.replication.outcome == 'failure' | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: postgres-log-replication | ||
path: | | ||
~/psql/data/logfile | ||
~/psql/data2/logfile | ||
# The test summary files contain paths with ':' characters, which is not allowed with the upload-artifact actions | ||
- name: Rename Test Summary Files | ||
id: test-file-rename | ||
if: always() && steps.replication.outcome == 'failure' | ||
run: | | ||
cd test/JDBC/Info | ||
timestamp=`ls -Art | tail -n 1` | ||
cd $timestamp | ||
mv $timestamp.diff ../output-diff.diff | ||
mv "$timestamp"_runSummary.log ../run-summary.log | ||
- name: Upload Run Summary | ||
if: always() && steps.test-file-rename.outcomeg == 'success' | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: run-summary.log | ||
path: test/JDBC/Info/run-summary.log | ||
|
||
- name: Upload Output Diff | ||
if: always() && steps.replication.outcome == 'failure' | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: output-diff.diff | ||
path: test/JDBC/Info/output-diff.diff | ||
|
||
- name: Check and upload coredumps | ||
if: always() && steps.replication.outcome == 'failure' | ||
uses: ./.github/composite-actions/upload-coredump |
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
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
Oops, something went wrong.