forked from edenbar23/SwipeLab
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (32 loc) · 912 Bytes
/
Copy pathfrontend-ci.yml
File metadata and controls
41 lines (32 loc) · 912 Bytes
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
name: Frontend CI
on:
# To enable automatic runs, uncomment the 4 lines below:
# pull_request:
# branches: [ "main" ]
# paths:
# - 'frontend/**'
# Allows manual triggering of the pipeline from the GitHub Actions tab:
workflow_dispatch:
jobs:
test:
name: Run Linter and Tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./frontend
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20' # Latest LTS version
cache: 'npm'
cache-dependency-path: './frontend/package-lock.json'
- name: Install dependencies
run: npm ci
- name: Run Linter
run: npm run lint
- name: Run Unit Tests
# Runs Jest directly. Update if a different script is defined in package.json
run: npx jest