Skip to content

Commit 5bddea3

Browse files
committed
add gh-action for frontend tests.
1 parent 093363d commit 5bddea3

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Frontend Unit Tests
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- 'frontend/**'
8+
- '.github/workflows/frontend-tests.yml'
9+
pull_request:
10+
branches: [ main ]
11+
paths:
12+
- 'frontend/**'
13+
- '.github/workflows/frontend-tests.yml'
14+
15+
jobs:
16+
test:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
23+
- name: Setup Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: '22'
27+
cache: 'npm'
28+
cache-dependency-path: frontend/package-lock.json
29+
30+
- name: Install dependencies
31+
working-directory: ./frontend
32+
run: npm ci
33+
34+
- name: Run unit tests
35+
working-directory: ./frontend
36+
run: npm run test:unit:run

0 commit comments

Comments
 (0)