chore : 사이트 분석 도구 추가 #34
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: E2E Tests | |
| on: | |
| push: | |
| branches: ['sunub'] | |
| paths: | |
| - 'frontend/**' | |
| - 'fx_utils/**' | |
| - 'posts/**' | |
| - 'package.json' | |
| - 'pnpm-lock.yaml' | |
| - '.github/workflows/e2e.yml' | |
| pull_request: | |
| branches: ['sunub'] | |
| paths: | |
| - 'frontend/**' | |
| - 'fx_utils/**' | |
| - 'posts/**' | |
| - 'package.json' | |
| - 'pnpm-lock.yaml' | |
| - '.github/workflows/e2e.yml' | |
| jobs: | |
| e2e-test: | |
| timeout-minutes: 60 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node.js and pnpm cache | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build utilities | |
| run: pnpm build:utils | |
| - name: Lint check | |
| run: | | |
| pnpm lint:frontend | |
| pnpm lint:utils | |
| - name: Type check # <--- 개선: 스텝의 목적을 명확히 하기 위해 이름 변경 고려 | |
| working-directory: frontend | |
| run: pnpm run lint # 실제로는 lint 스크립트가 타입 체크를 수행 | |
| - name: Build frontend | |
| run: pnpm build:f | |
| - name: Install Playwright browsers | |
| working-directory: frontend | |
| run: pnpm exec playwright install --with-deps chromium firefox webkit | |
| - name: Run unit tests | |
| working-directory: frontend | |
| run: pnpm run test:unit | |
| - name: Run E2E tests | |
| working-directory: frontend | |
| run: pnpm run test:e2e | |
| env: | |
| CI: true | |
| - name: Upload Playwright report | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: playwright-report | |
| path: frontend/playwright-report/ | |
| retention-days: 30 | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: test-results | |
| path: frontend/test-results/ | |
| retention-days: 30 |