Skip to content

Commit ae26763

Browse files
author
Janne Rönkkö
committed
Show PostgreSQL logs if it does not start when setting up E2E environment
1 parent 72ba100 commit ae26763

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

github-actions/setup-e2e-environment/action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,21 @@ runs:
165165
command: "curl --fail http://localhost:3300 --output /dev/null --silent"
166166

167167
- name: Verify that postgresql is up and running
168+
id: verify_postgresql_started
168169
uses: HSLdevcom/jore4-tools/github-actions/healthcheck@healthcheck-v1
169170
with:
170171
command: "pg_isready -h localhost -p 6432"
171172
# it takes a while for the database to start
172173
retries: 50
173174

175+
- name: Show PostgreSQL logs
176+
if: ${{ failure() && steps.verify_postgresql_started.outcome == 'failure' }}
177+
run: |
178+
docker logs testdb
179+
shell: bash
180+
174181
- name: Verify that mssql testdb is up and running
182+
id: verify_mssql_started
175183
if: ${{ inputs.start_jore3_importer == 'true' }}
176184
uses: HSLdevcom/jore4-tools/github-actions/healthcheck@healthcheck-v1
177185
env:

0 commit comments

Comments
 (0)