[STK9-01] GitHub Actions CI 파이프라인

작업 내용 (설계 의도)

변경 사항

PR to main 시 자동 실행되는 GitHub Actions CI 워크플로우를 신설한다. 백엔드 테스트, 프론트엔드 테스트, E2E 스모크, Docker 빌드 체크 4개 잡을 순차-병렬 조합으로 구성한다. E2E 잡은 STK9-04에서 테스트 파일이 추가되기 전까지 stub(placeholder) 상태로 포함된다.

잡 구성:

  • test-backend: MySQL service 컨테이너 + ./gradlew test --no-daemon
  • test-frontend: npm ci && npm test
  • e2e: test-backend + test-frontend 완료 후 실행. MySQL service + bootRun(백엔드) + npm run dev(프론트) + npx playwright test e2e/smoke/
  • build: e2e 완료 후 실행. Gradle 빌드 + Docker 빌드 체크 (push 없음)

트리거: pull_request (to main), workflow_dispatch

다이어그램

처리 흐름

sequenceDiagram
    participant PR as Pull Request
    participant CI as ci.yml
    participant BE as test-backend
    participant FE as test-frontend
    participant E2E as e2e
    participant BUILD as build

    PR->>CI: PR to main
    CI->>BE: MySQL service 기동 → gradlew test
    CI->>FE: npm ci → npm test
    BE-->>E2E: 완료
    FE-->>E2E: 완료
    E2E->>E2E: MySQL + bootRun + npm dev + playwright
    E2E-->>BUILD: 완료
    BUILD->>BUILD: gradlew build + docker build (no push)
    BUILD-->>PR: CI 결과

잡 의존 관계

flowchart LR
    BE[test-backend] --> E2E[e2e]
    FE[test-frontend] --> E2E
    E2E --> BUILD[build]

테스트 케이스

  • ./gradlew test 실패 시 test-backend 잡이 실패하고 E2E·build 잡은 실행되지 않는다
  • npm test 실패 시 test-frontend 잡이 실패하고 E2E·build 잡은 실행되지 않는다
  • E2E 테스트 파일이 없는 상태(STK9-04 이전)에서도 e2e 잡이 오류 없이 통과된다
  • PR Branch Protection 설정 후 CI 미통과 상태에서 머지 버튼이 비활성화된다
  • workflow_dispatch로 수동 트리거 시 잡이 정상 실행된다