9b95be851c
Bumps [dorny/paths-filter](https://github.com/dorny/paths-filter) from 3 to 4. - [Release notes](https://github.com/dorny/paths-filter/releases) - [Changelog](https://github.com/dorny/paths-filter/blob/master/CHANGELOG.md) - [Commits](https://github.com/dorny/paths-filter/compare/v3...v4) --- updated-dependencies: - dependency-name: dorny/paths-filter dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Daniel Volz <mail@danielvolz.org>
88 lines
2.1 KiB
YAML
88 lines
2.1 KiB
YAML
name: E2E Tests
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
# Minimal permissions for security
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
changes:
|
|
name: Detect E2E relevance
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
pull-requests: read
|
|
outputs:
|
|
e2e_relevant: ${{ steps.filter.outputs.e2e_relevant }}
|
|
steps:
|
|
- uses: dorny/paths-filter@v4
|
|
id: filter
|
|
with:
|
|
filters: |
|
|
e2e_relevant:
|
|
- 'frontend/**'
|
|
- 'backend/**'
|
|
|
|
e2e:
|
|
name: Playwright E2E
|
|
needs: changes
|
|
if: needs.changes.outputs.e2e_relevant == 'true'
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
permissions:
|
|
contents: read
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: '22'
|
|
cache: 'npm'
|
|
cache-dependency-path: |
|
|
backend/package-lock.json
|
|
frontend/package-lock.json
|
|
|
|
- name: Install backend dependencies
|
|
working-directory: backend
|
|
run: npm ci
|
|
|
|
- name: Install frontend dependencies
|
|
working-directory: frontend
|
|
run: npm ci
|
|
|
|
- name: Install Playwright browsers
|
|
working-directory: frontend
|
|
run: npx playwright install --with-deps chromium
|
|
|
|
- name: Run E2E tests (Chromium only)
|
|
working-directory: frontend
|
|
run: npx playwright test --project=chromium
|
|
env:
|
|
CI: true
|
|
PLAYWRIGHT_WORKERS: 1
|
|
PLAYWRIGHT_HTML_OPEN: never
|
|
JWT_SECRET: e2e-test-secret-that-is-long-enough
|
|
SESSION_SECRET: e2e-test-session-secret-long-enough
|
|
|
|
- name: Upload Playwright report
|
|
uses: actions/upload-artifact@v7
|
|
if: always()
|
|
with:
|
|
name: playwright-report
|
|
path: frontend/playwright-report/
|
|
retention-days: 7
|
|
|
|
- name: Upload test results
|
|
uses: actions/upload-artifact@v7
|
|
if: always()
|
|
with:
|
|
name: playwright-results
|
|
path: frontend/test-results/
|
|
retention-days: 7
|