13 - API (feat): Move Authn/z to Edge Guards #64
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: Test Frontend | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "frontend/**" | |
| - ".github/workflows/test-frontend.yml" | |
| pull_request: | |
| paths: | |
| - "frontend/**" | |
| - ".github/workflows/test-frontend.yml" | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| defaults: | |
| run: | |
| working-directory: frontend | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Set up Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: "frontend/package.json" | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: ESLint | |
| run: pnpm run lint:eslint | |
| - name: Prettier check | |
| run: pnpm run lint:prettier | |
| - name: Type check | |
| run: pnpm run lint:tsc | |
| - name: Install Playwright browser | |
| run: pnpm --filter @damnit-frontend/ui exec playwright install --with-deps chromium | |
| - name: Test | |
| run: pnpm test | |
| e2e: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| defaults: | |
| run: | |
| working-directory: frontend | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Set up Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: "frontend/package.json" | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Install Playwright browser | |
| run: pnpm --filter @damnit-frontend/e2e exec playwright install --with-deps chromium | |
| - name: Build app | |
| run: pnpm --filter @damnit-frontend/app build | |
| env: | |
| VITE_BASE_URL: /app/ | |
| - name: e2e | |
| run: pnpm e2e | |
| # Keep this always(): a timeout cancels the job rather than failing it, | |
| # and failure() does not fire on cancellation, so traces would be lost | |
| # exactly when a slow, failing run has produced them. Green runs leave | |
| # test-results/ empty, hence ignore. | |
| - name: Upload traces | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: playwright-traces | |
| path: frontend/e2e/test-results/ | |
| if-no-files-found: ignore |