Code refactoring #11
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
| name: E2E | |
| on: | |
| pull_request: | |
| types: [labeled, synchronize] | |
| workflow_dispatch: | |
| concurrency: | |
| group: e2e-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| e2e: | |
| name: Playwright E2E (production build) | |
| if: >- | |
| github.event_name == 'workflow_dispatch' || | |
| (github.event.action == 'labeled' && github.event.label.name == 'run-e2e') || | |
| (github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'run-e2e')) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Install Playwright browser | |
| run: bunx playwright install --with-deps chromium | |
| # test:e2e:preview builds once (PAYKY_E2E_BUILD=1 vite build) and runs | |
| # the full Playwright suite against that build via `vite preview`, | |
| # instead of the dev server test:e2e uses. | |
| - name: Run e2e tests against a production build | |
| run: bun run test:e2e:preview | |
| - name: Upload Playwright report | |
| if: ${{ !cancelled() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-report | |
| path: playwright-report/ | |
| retention-days: 7 |