Skip to content

Commit 1adb1a7

Browse files
committed
ci: debug PR build, show DAL logs on test faliure
1 parent 4b0b19a commit 1adb1a7

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

.github/workflows/check-pull-request.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,24 @@ jobs:
8585

8686
- name: Acceptance & environment emulation tests
8787
run: |
88-
npm run test:acceptance:docker && \
89-
npm run test:acceptance:proxy
88+
set +e
89+
docker compose -f compose.yml -f test/acceptance/compose.yml \
90+
run --rm --build --pull always --quiet-pull test
91+
if [ $? -ne 0 ]; then
92+
echo -e '\n\n====> Dumping DAL logs...\n'
93+
docker logs fcp-dal-api-fcp-dal-api-1 | jq
94+
docker compose down --remove-orphans
95+
exit 1
96+
fi
97+
docker compose -f compose.yml -f test/acceptance/compose.yml -f test/acceptance/cdp-mock-check.yml \
98+
run --rm --quiet-pull test # no need to build or pull again
99+
if [ $? -ne 0 ]; then
100+
echo -e '\n\n====> Dumping DAL logs...\n'
101+
docker logs fcp-dal-api-fcp-dal-api-1 | jq
102+
docker compose down --remove-orphans
103+
exit 1
104+
fi
105+
docker compose down --remove-orphans
90106
# TODO: re-enable mTLS tests when startup health check issue is resolved
91107
# && npm run test:acceptance:proxy:mtls
92108

0 commit comments

Comments
 (0)