-
-
Notifications
You must be signed in to change notification settings - Fork 57
70 lines (57 loc) · 1.73 KB
/
Copy pathbuild-frontend.yml
File metadata and controls
70 lines (57 loc) · 1.73 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Node.js CI - Frontend
on:
push:
branches: [main, dev]
paths:
- 'apps/frontend/**' # any file under frontend
pull_request:
branches: [main, dev]
paths:
- 'apps/frontend/**' # any file under frontend
workflow_dispatch:
# Cancel previous runs when a new one is triggered (same branch/PR)
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Setup Node.js 24.x
uses: actions/setup-node@v6
with:
node-version: 24.x
cache: npm
- name: Verify Node.js version
run: node -v
- name: Verify Npm version
run: npm -v
- name: Install dependencies
run: npm ci --no-fund --no-audit
working-directory: apps/frontend
- name: Check format of the project
run: npm run format:check
working-directory: apps/frontend
- name: Lint the project
run: npm run lint
working-directory: apps/frontend
- name: Build the project
run: npm run build
working-directory: apps/frontend
- name: Test the project
run: npm run test -- --testTimeout=30000
working-directory: apps/frontend
- name: List, audit, fix outdated dependencies, update and build again
run: |
npm outdated || true
npm audit || true
npm audit fix || true
npm update || true
npm outdated || true
npm audit || true
npm run lint || true
npm run build || true
npm run test -- --testTimeout=30000 || true
working-directory: apps/frontend