forked from UAVLab-SLU/DRV_public
-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (45 loc) · 1.02 KB
/
frontend-ci.yml
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 CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
frontend-setup:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Cache Node.js modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install dependencies
run: |
cd frontend
npm install
- name: Lint frontend code
run: |
cd frontend
npm run lint
- name: Format frontend code with Prettier
run: |
cd frontend
npm run format
- name: Build frontend
run: |
cd frontend
npm run build
- name: Run ESLint Security Checks
run: |
cd frontend
npm audit --omit=dev --audit-level=critical || true