Add frontend-e2e job to CI pipeline
Runs Playwright E2E tests with Chromium after checkout. Uploads HTML report as artifact on failure. build-and-publish now requires all three test jobs.
This commit is contained in:
@@ -46,8 +46,35 @@ jobs:
|
|||||||
- name: Production build
|
- name: Production build
|
||||||
run: cd frontend && npm run build
|
run: cd frontend && npm run build
|
||||||
|
|
||||||
|
frontend-e2e:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Node 24
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 24
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: cd frontend && npm ci
|
||||||
|
|
||||||
|
- name: Install Playwright browsers
|
||||||
|
run: cd frontend && npx playwright install --with-deps chromium
|
||||||
|
|
||||||
|
- name: Run E2E tests
|
||||||
|
run: cd frontend && npm run test:e2e
|
||||||
|
|
||||||
|
- name: Upload Playwright report
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
if: ${{ !cancelled() }}
|
||||||
|
with:
|
||||||
|
name: playwright-report
|
||||||
|
path: frontend/playwright-report/
|
||||||
|
retention-days: 30
|
||||||
|
|
||||||
build-and-publish:
|
build-and-publish:
|
||||||
needs: [backend-test, frontend-test]
|
needs: [backend-test, frontend-test, frontend-e2e]
|
||||||
if: startsWith(github.ref, 'refs/tags/') && contains(github.ref_name, '.')
|
if: startsWith(github.ref, 'refs/tags/') && contains(github.ref_name, '.')
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
Reference in New Issue
Block a user