fix: keep the /api prefix when proxying /api/logs/* #217
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
| # =============================================================== | |
| # React Client E2E - Playwright (TypeScript) smoke suite | |
| # =============================================================== | |
| # - runs TypeScript Playwright tests for the React admin UI | |
| # - Vite dev server is spawned by Playwright's webServer config | |
| # - backend API is stubbed with page.route() (no gateway required) | |
| # - triggered on PRs and pushes to main | |
| # --------------------------------------------------------------- | |
| name: Client E2E (Playwright) | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| types: [opened, synchronize, ready_for_review] | |
| branches: ["main"] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| playwright: | |
| if: github.event_name != 'pull_request' || !github.event.pull_request.draft | |
| name: Playwright smoke + auth | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| env: | |
| CI: "true" | |
| PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/.playwright-browsers | |
| steps: | |
| - name: ⬇️ Checkout source | |
| uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 1 | |
| - name: 🟩 Setup Node | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version-file: ".nvmrc" | |
| - name: 📥 Install dependencies | |
| run: npm ci --no-audit --no-fund | |
| - name: ⚙️ Generate types with orval | |
| run: npm run generate | |
| - name: 🎭 Cache Playwright browsers | |
| id: playwright-cache | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: ${{ env.PLAYWRIGHT_BROWSERS_PATH }} | |
| key: ${{ runner.os }}-playwright-${{ hashFiles('package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-playwright- | |
| - name: 🎭 Install Playwright browsers | |
| if: steps.playwright-cache.outputs.cache-hit != 'true' | |
| run: npx playwright install --with-deps chromium | |
| - name: 🎭 Install Playwright system deps (cached browsers) | |
| if: steps.playwright-cache.outputs.cache-hit == 'true' | |
| run: npx playwright install-deps chromium | |
| - name: 🧪 Run Playwright tests | |
| run: npm run e2e | |
| - name: 📦 Upload Playwright HTML report | |
| if: always() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: playwright-report | |
| path: playwright-report | |
| retention-days: 7 | |
| if-no-files-found: ignore | |
| - name: 📦 Upload Playwright traces on failure | |
| if: failure() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: playwright-traces | |
| path: test-results | |
| retention-days: 7 | |
| if-no-files-found: ignore |