Skip to content

feature/api-spec-first #19

feature/api-spec-first

feature/api-spec-first #19

name: Frontend Tests
on:
pull_request:
paths:
- 'frontend/**'
- '.github/workflows/frontend-tests.yml'
workflow_dispatch:
jobs:
test:
name: Frontend Lint / Test / Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: 'frontend/.nvmrc'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
working-directory: frontend
run: npm ci
- name: Lint
working-directory: frontend
run: npm run lint
- name: Unit tests
working-directory: frontend
run: npm run test
- name: Build (tsc + vite)
working-directory: frontend
run: npm run build
- name: Upload build artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: frontend-dist
path: frontend/dist/
if-no-files-found: ignore