Conversation
새로 추가한 apps/web-user/e2e(심사용 로그인·예약 생성 골든패스)는 지금까지 로컬에서만 yarn web-user:test:e2e로 돌릴 수 있었다. backend 서버 + Postgres까지 함께 떠 있어야 해서, vitest만 도는 기존 test-web.yml에는 그대로 못 끼워 넣어 별도 워크플로우로 분리했다. test-backend.yml과 동일하게 PR 전용 Postgres 서비스 컨테이너를 띄우고 .env.test를 그 자리에서 만드는데, backend를 직접 기동하는 커맨드는 따로 안 넣었다 — playwright.config.ts의 webServer가 이미 `db:migrate:test → seed:e2e-fixture → start:test`를 알아서 실행하므로(로컬과 완전히 동일 경로), CI job은 Postgres와 .env.test만 준비해주면 된다. web-user 쪽은 next dev가 읽는 .env.development가 .gitignore 대상이라 CI 체크아웃에는 없다는 걸 로컬에서 실제로 지워보고 확인했다 — NEXT_PUBLIC_API_DOMAIN만 있으면 리뷰 로그인·예약 생성 플로우는 통과하고(OAuth 로그인 버튼류는 이 E2E가 안 씀), Sentry/PostHog는 키가 없으면 조용히 비활성화되는 기존 정책을 그대로 탄다. 브라우저 E2E는 유닛테스트보다 플레이키할 여지가 있어, 아직 브랜치 보호 필수 체크로는 올리지 않았다 — 몇 차례 안정적으로 통과하는 걸 지켜본 뒤 승격 여부를 판단한다. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Au6qVAM3RXf7rAakifYDcL
첫 실행(#176)에서 test-web-e2e가 20초 만에 "Process from config.webServer was not able to start. Exit code: 1"만 남기고 죽었다. Playwright의 webServer 배열이 backend·web-user 두 프로세스를 병렬로 새로 띄우는데, 둘 다 아직 stdout을 거의 안 쓴 시점에 한쪽이 죽으면 그 프로세스의 버퍼링된 출력이 파이프가 끊기기 전에 플러시되지 못해 원인이 전혀 안 남는다(같은 .env.test로 test-backend.yml은 정상 통과했으니 DB·env 문제는 아님을 먼저 확인함). 그래서 CI에서만 migrate → seed → backend 기동 → web-user 기동을 각각 별도 step으로 분리해 로그를 남기고, curl로 응답 확인까지 마친 뒤에만 Playwright를 돌린다. playwright.config.ts는 이미 응답 중인 서버를 그대로 쓰도록 reuseExistingServer를 CI 여부와 무관하게 true로 바꿨다(로컬 단일 명령 실행은 그대로 자기가 띄워서 씀 — 로컬에서 재검증함). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Au6qVAM3RXf7rAakifYDcL
…제 수정 이전 커밋에서 서버를 별도 step으로 분리해 로그는 남았지만(SellerApiModule까지 초기화 로그 찍고 정지), 여전히 원인 불명으로 실패했다. 로컬에서 동일하게 PORT/CORS_ORIGIN만 뺀 .env.test로 yarn start:test를 직접 돌려 정확히 같은 지점(마지막 InstanceLoader 로그 이후 무응답)에서 멈추는 걸 재현했고, 두 값을 채우자 바로 해결됨을 확인했다. test:e2e/test:integration은 Nest 앱을 Test.createTestingModule()로 직접 만들어 app.listen()을 안 타서 PORT가 없어도 됐지만, start:test(=main.ts)는 실제로 포트를 열고 CORS를 검사하는 정식 부트스트랩이라 두 값이 필수다 — 다만 실패 방식이 즉시 에러가 아니라 응답 없는 정지라 원인 파악에 시간이 걸렸다. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Au6qVAM3RXf7rAakifYDcL
…-e2e [COMMON]: web-user Playwright E2E를 PR 자동 테스트에 연결
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.
📋 요약
web-user Playwright E2E(심사용 로그인·예약 생성)를 PR 자동 테스트에 연결하는 CI 전용 변경을 main에도 반영합니다. 앱 런타임 코드는 바뀌지 않아 별도 배포는 필요 없습니다.
✨ 주요 변경사항
.github/workflows/test-web-e2e.yml신설 —test-backend.yml과 동일하게 PR 전용 Postgres 컨테이너를 띄우고, backend·web-user를 각각 별도 step으로 기동한 뒤 Playwright E2E 실행.env.test에PORT/CORS_ORIGIN이 빠지면main.ts가 에러 없이 무한정 멈추는 문제 발견·수정 —test:e2e/test:integration은app.listen()을 안 타서 지금까지 안 드러났던 문제🧪 테스트 계획
Test Web E2E)가 두 차례 연속 통과하는 것 확인📎 참고 사항
test-web-e2e는 아직 브랜치 보호 필수 체크로는 올리지 않았습니다(결과만 보고) — 몇 차례 더 안정성을 지켜본 뒤 승격 여부를 판단할 예정입니다.