Skip to content

Commit bf3515d

Browse files
tconley1428claude
andauthored
fix: propagate unit test exit codes in CI workflow (#768)
* fix: propagate unit test exit codes in CI workflow Add --exit-code-from flag to docker compose command to ensure unit test failures properly fail the GitHub Actions job. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Fix springboot test --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 6244cbe commit bf3515d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
- name: Run unit tests
2727
run: |
28-
docker compose -f ./docker/github/docker-compose.yaml up unit-test
28+
docker compose -f ./docker/github/docker-compose.yaml up --exit-code-from unit-test unit-test
2929
3030
code_format:
3131
name: Code format

springboot/src/test/resources/application.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ spring:
1515
# enable test server for testing
1616
test-server:
1717
enabled: true
18+
ignore-duplicate-definitions: true
1819
# data source config for tests that need it
1920
datasource:
2021
url: jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;DB_CLOSE_ON_EXIT=FALSE;

0 commit comments

Comments
 (0)