2026-04 도입 · Playwright + ReportPortal + GitHub Actions 파이프라인 전수 분석
Playwright는 GitHub Actions 러너에서 실행되고, 결과는 alpha에 셀프호스팅된 ReportPortal로 업로드됩니다. RP 컨테이너는 외부 포트 노출 없이 nginx(rp.rinda.ai)만 유일 진입점입니다.
┌─ GitHub Actions (e2e-on-alpha.yml) ─────────────────────────┐
│ detect → e2e (matrix shard) → notify │
└──────────────┬──────────────────────────────────────────────┘
│ npx playwright test (https://alpha.rinda.ai 대상)
▼
@reportportal/agent-js-playwright (reporter)
│ launch 업로드 (RP_API_KEY)
▼
┌─ alpha 호스트 (docker) ─────────────────────────────────────┐
│ nginx(rp.rinda.ai) ──[reportportal external net]── rp-gateway:8080
│ (docker-compose.rp.yml 스택)
└─────────────────────────────────────────────────────────────┘
│
▼ rp-defect-classifier.mjs (PUT /item · defect 자동분류)
▼ notify job → Slack 배포알림 채널 집계 카드
detect · 영향 범위 산정HEAD~1..HEAD diff(squash merge 전제)로 변경 파일을 분석해 실행 범위를 결정합니다.
| 변경 유형 | mode | 실행 paths |
|---|---|---|
*.md / docs/ 만 | skip | 실행 안 함 |
DB schema · drizzle · e2e/ · package.json · vite · routes · workflows · docker-compose.*.yml · nginx | full | smoke critical tests/db 전량 |
| 도메인 경로 (sequences / leads / email / dashboard) | partial | tests/smoke tests/db + 해당 도메인 critical |
smoke + db는 항상 포함(빠른 sanity). FE·BE 경로를 동시 매칭하는 4개 도메인 레인 구성.
e2e · Playwright 실행 (matrix 샤딩)| # | 스텝 | 내용 |
|---|---|---|
| 1 | Checkout | workflow_run.head_sha 기준 |
| 2 | Infisical CLI | v0.43.60 설치 + .deb 매직바이트(!<arch>) 무결성 검증 |
| 3 | 시크릿 fetch | universal-auth → /reportportal(RP_API_KEY) + /e2e(E2E_EMAIL/PW). E2E_EMAIL 없으면 skip |
| 4 | Playwright 설치 | chromium · browser 캐시 키 = package-lock 해시 |
| 5 | 테스트 실행 | E2E_BASE_URL=alpha.rinda.ai · playwright test $PATHS --shard=N/TOTAL |
| 6 | 아티팩트 | test-results + playwright-report 업로드 (7일, if: always()) |
timeout-minutes: 15 · fail-fast: false · 동시성 cancel-in-progress: true → 고빈도 배포 시 최신 1건만 실행, 이전 run 자동 취소.
notify · 집계 + Slack전 shard 아티팩트의 report.json → stats.{expected/unexpected/skipped/flaky} 합산 후 단일 Slack 카드 발송.
[Rinda - alpha] RP E2E full
• 자동QA 기능 테스트 · 최신 배포 1건만 실행
• 통과: N/M · 실패: X · 스킵: Y · flaky: Z
• PR: #NNNN · 리포트: Report Portal(rp.rinda.ai)
| 항목 | local 모드 | alpha 모드 |
|---|---|---|
| workers | 20 (M4 Pro sweet spot) | 12 |
| retries | 1 | 0 |
| RP 업로드 | OFF | ON (RP_API_KEY 있을 때) |
| trace/video/screenshot | on (FAST_MODE 시 on-failure 다운그레이드) | |
setup(auth) → chromium(인증 의존) · chromium-noauth(*.noauth.spec.ts) · db(drizzle 직접, UI·auth 불필요). RP reporter는 includeTestSteps:false로 한국어 test 제목을 TEST로, spec 파일을 SUITE로 노출.
storageState 이중 캐시 검증으로 로그인 비용 제거:
uiLogin() 단일 경로(10초) — 과거 apiLogin/jwtLogin은 alpha dual-auth 구조에 재튕겨 폐기| 스크립트 | 역할 |
|---|---|
rp-meta.mjs | launch 이름 <env>-<mode>-<shortSha> + attributes(env/mode/branch/commit/owner/risk/pr) 동적 생성 |
rp-defect-classifier.mjs | 실패 테스트를 PB·AB·SI·ND·TI 5종으로 자동분류 → RP API PUT /item. 5xx→PB, 셀렉터/타이밍→AB, DB다운/타임아웃→SI |
rp-merge.mjs | 도메인별 분할 launch(leads/sequences/billing)를 1개로 병합 |
rp-cleanup.mjs | 오래된 launch 정리 |
analyze-report.mjs | report.json 로컬 분석 |
.env.rp 생성 + reconciledocker-compose.rp.yml 삭제| 측면 | 상태 |
|---|---|
| 설계 완성도 | 높음 detect→shard→RP 업로드→defect 분류→Slack 풀 파이프라인 |
| 운영 상태 | 반쪽 workflow_dispatch 수동만 · RP 본체 compose 제거됨 |
| 잔존물 | nginx rp.rinda.ai 블록 + compose external network + 249 spec + 전체 RP 스크립트 |
| 이탈 사유 | full 모드 15분 timeout 히트 + nightly/CI reconcile 운영 부담 |
ssh alpha "docker ps | grep -iE 'rp-|reportportal'"로만 확정 가능합니다.