fix: 백엔드 CI에 테스트용 PostgreSQL 서비스컨테이너 추가#19
Merged
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
문제
Backend CI/CD가 2026-07-03 이후 main push마다 계속 실패.
DazzApplicationTests.contextLoads()가 @SpringBootTest로 전체 컨텍스트를 띄우며 실제 PostgreSQL연결을 시도하는데, CI러너엔 접속할 DB자체가 없어서 Connection refused로 매번 테스트 실패 -> 빌드 실패
해결
build job에 services: postgres블록 추가 - CI가 도는 동안만 존재하는 임시 PostgreSQL컨테이너를 띄워, 기존 DB_DATABASE/DB_USER/DB_PASSWORD 더미 환경변수와 짝을 맞춤. 운영DB와는 무관한 CI전용 격리DB
테스트