Merge pull request #132 from Malloc72P/claude/issue-85-mobile-toc #42
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
| name: CI | |
| # PR과 main 푸시에서 lint·타입체크·단위·E2E를 검증한다. | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| # 같은 브랜치/PR의 진행 중 실행은 취소해 러너 사용량을 줄인다. | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: lint · type-check · unit · e2e | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| # pnpm을 먼저 설치해야 setup-node의 pnpm 캐시가 동작한다. | |
| # 버전은 루트 package.json의 packageManager(pnpm@9.0.0) 필드를 따른다. | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Lint | |
| run: pnpm --filter blog lint | |
| - name: Type check | |
| run: pnpm --filter blog exec tsc --noEmit | |
| - name: Unit tests (Jest) | |
| run: pnpm --filter blog test | |
| # E2E용 Chromium과 OS 의존성을 설치한다. | |
| - name: Install Playwright browser | |
| run: pnpm --filter blog exec playwright install --with-deps chromium | |
| # CI=true가 자동 주입되므로 playwright.config가 프로덕션 빌드(build && start)로 검증한다. | |
| - name: E2E tests (Playwright) | |
| run: pnpm --filter blog test:e2e | |
| # 실패 시 분석용 HTML 리포트(트레이스 포함)를 아티팩트로 올린다. | |
| - name: Upload Playwright report | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-report | |
| path: apps/blog/playwright-report/ | |
| retention-days: 7 | |
| if-no-files-found: ignore |