Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/frontend-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Frontend Tests

# Runs on every PR to main (and pushes to main) that touch the frontend, so a
# broken change is caught here instead of when a user opens Word. Also keeps the
# manual trigger for ad-hoc runs.
on:
push:
branches:
- main
paths:
- 'frontend/**'
- '.github/workflows/frontend-tests.yml'
pull_request:
branches:
- main
paths:
- 'frontend/**'
- '.github/workflows/frontend-tests.yml'
workflow_dispatch:

defaults:
run:
working-directory: frontend

jobs:
unit:
name: Unit tests (Vitest)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v6
with:
node-version: lts/*
cache: npm
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
run: npm ci
- name: Run unit tests
run: npm test

e2e:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Comment on lines +27 to +41
name: E2E tests (Playwright)
timeout-minutes: 60
runs-on: ubuntu-latest
# Pinned to match the installed @playwright/test version (1.60.0); bump both
# together so the committed visual snapshots keep matching.
container:
image: mcr.microsoft.com/playwright:v1.60.0-noble
options: --user 1001
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v6
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Build Frontend
run: npm run build
- name: Run Playwright tests
run: npx playwright test
- uses: actions/upload-artifact@v7
if: ${{ !cancelled() }}
with:
name: playwright-report
path: frontend/playwright-report/
retention-days: 30

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Comment on lines +42 to +66
33 changes: 0 additions & 33 deletions .github/workflows/playwright.yml

This file was deleted.

Loading
Loading