-
Notifications
You must be signed in to change notification settings - Fork 5
55 lines (44 loc) · 1.27 KB
/
frontend-tests.yml
File metadata and controls
55 lines (44 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Frontend Tests
on:
push:
branches: [ master, main, svelte, fastapi ]
paths:
- 'frontend/**'
- '.github/workflows/frontend-tests.yml'
pull_request:
branches: [ master, main, svelte, fastapi ]
paths:
- 'frontend/**'
- '.github/workflows/frontend-tests.yml'
jobs:
test:
name: Run Frontend Tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./frontend
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: './frontend/package-lock.json'
- name: Install dependencies
run: npm ci
- name: Run type checking
run: npm run check
- name: Run linting
run: npm run lint
- name: Run tests
run: npm run test:run
- name: Generate coverage report
run: npm run test:coverage
- name: Comment PR with coverage
uses: marocchino/sticky-pull-request-comment@v2
if: github.event_name == 'pull_request'
with:
recreate: true
path: frontend/coverage/coverage-summary.json