Skip to content

Commit ee4bfdf

Browse files
authored
Check postgres connection (#35)
* add pg_isready step * test postgres with non-standard db port
1 parent 2508d0f commit ee4bfdf

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/maven-verify.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ jobs:
7575
database: ${{ inputs.db-name }}
7676
port: ${{ inputs.db-port }}
7777

78+
- name: Test PostgreSQL connection
79+
if: inputs.db-type == 'postgresql'
80+
run: pg_isready --host=localhost --port=${{ inputs.db-port }} --dbname=${{ inputs.db-name }} --username=${{ inputs.db-username }}
81+
7882
- # https://github.com/ankane/setup-mongodb
7983
# copied from FDP v1.17.2 build.yml
8084
# TODO: ankane/setup-mongodb is a one-man band, should we use an alternative?

.github/workflows/test-maven-verify.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
db_name: 'test'
3838
db_username: 'test'
3939
db_password: 'test'
40-
db_port: 5432
40+
db_port: 54321
4141
uses: ./.github/workflows/maven-verify.yml
4242
with:
4343
runner: ${{ matrix.runner }}

0 commit comments

Comments
 (0)