Frontend #1
Workflow file for this run
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
| # Frontend quality checks (lint, typecheck, test, build) for the pnpm workspace under frontend/. | |
| name: Frontend | |
| on: | |
| workflow_call: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| jobs: | |
| checks: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: frontend | |
| steps: | |
| - name: Checkout codebase | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@26f6d4f2c533a43e6b5da0b4a5dd983f98f7b49a # v6.0.4 | |
| with: | |
| version: 10.33.0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: "20.20.2" | |
| cache: pnpm | |
| cache-dependency-path: frontend/pnpm-lock.yaml | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Lint (oxlint) | |
| run: pnpm lint | |
| - name: Typecheck (tsc --noEmit) | |
| run: pnpm typecheck | |
| - name: Test (Vitest) | |
| run: pnpm test | |
| - name: Build | |
| run: pnpm build | |
| - name: Build Storybook | |
| run: pnpm build-storybook | |
| e2e: | |
| name: E2E (Playwright / Chromium) | |
| runs-on: ubuntu-latest | |
| needs: [checks] | |
| defaults: | |
| run: | |
| working-directory: frontend | |
| steps: | |
| - name: Checkout codebase | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@26f6d4f2c533a43e6b5da0b4a5dd983f98f7b49a # v6.0.4 | |
| with: | |
| version: 10.33.0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: "20.20.2" | |
| cache: pnpm | |
| cache-dependency-path: frontend/pnpm-lock.yaml | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Cache Playwright Chromium | |
| id: playwright-cache | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-${{ hashFiles('frontend/packages/e2e/package.json') }} | |
| restore-keys: playwright- | |
| - name: Install Playwright Chromium and system deps | |
| if: steps.playwright-cache.outputs.cache-hit != 'true' | |
| run: pnpm --filter @sep/e2e exec playwright install chromium --with-deps | |
| - name: Run E2E tests | |
| run: pnpm --filter @sep/e2e test:e2e | |
| - name: Upload Playwright report | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| if: failure() | |
| with: | |
| name: playwright-report | |
| path: frontend/packages/e2e/playwright-report/ | |
| retention-days: 7 |