SvelteKit 2.0 + refactor #3
Workflow file for this run
This file contains 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: Testing E2E | |
on: | |
pull_request: | |
branches: | |
- '**' | |
types: | |
- opened | |
- synchronize | |
- reopened | |
- ready_for_review | |
paths: | |
- "pocketbase/**" | |
- "svelte-kit/**" | |
- "playwright/**" | |
- ".github/workflows/test-e2e.yml" | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: Testing E2E | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: 1.0.30 | |
- name: Copy .env.ci to .env.local (SvelteKit) | |
run: cp ./svelte-kit/.env.ci ./svelte-kit/.env.local | |
- name: Install SvelteKit dependencies | |
working-directory: ./svelte-kit | |
run: bun install | |
- name: Build SvelteKit app | |
working-directory: ./svelte-kit | |
run: bun run build | |
- name: Preview SvelteKit app | |
working-directory: ./svelte-kit | |
run: bun run preview --host & | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
- name: Get PocketBase dependencies | |
working-directory: ./pocketbase | |
run: go mod tidy | |
- name: Launch PocketBase | |
working-directory: ./pocketbase | |
run: go run main.go serve --http 0.0.0.0:8090 & | |
- name: Copy .env.ci to .env.local (Playwright) | |
run: cp ./playwright/.env.ci ./playwright/.env.local | |
- name: Install Playwright dependencies | |
working-directory: ./playwright | |
run: bun install | |
- name: Install Playwright Browsers | |
run: bunx playwright install --with-deps | |
- name: Run Playwright tests | |
working-directory: ./playwright | |
run: bunx playwright test | |
- name: Upload Playwright report | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 |