Skip to content

Commit 4963eb4

Browse files
authored
Merge pull request Junirezz#284 from broda-spendy/fix/143-add-performance-budget-and-bundle-analysis-in-ci
[143] Add performance budget and bundle analysis in CI
2 parents 78df015 + a72cd36 commit 4963eb4

12 files changed

Lines changed: 5905 additions & 6 deletions

.github/workflows/frontend.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Frontend CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build-and-analyze:
11+
runs-on: ubuntu-latest
12+
defaults:
13+
run:
14+
working-directory: frontend
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 20
24+
cache: 'npm'
25+
cache-dependency-path: frontend/package-lock.json
26+
27+
- name: Install dependencies
28+
run: npm ci
29+
30+
- name: Build
31+
run: npm run build
32+
33+
- name: Check Performance Budget
34+
run: npm run check-size
35+
36+
- name: Upload Bundle Analysis Report
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: bundle-analysis
40+
path: frontend/bundle-stats.html
41+
retention-days: 7
42+
43+
lint-and-test:
44+
runs-on: ubuntu-latest
45+
defaults:
46+
run:
47+
working-directory: frontend
48+
49+
steps:
50+
- name: Checkout repository
51+
uses: actions/checkout@v4
52+
53+
- name: Set up Node.js
54+
uses: actions/setup-node@v4
55+
with:
56+
node-version: 20
57+
cache: 'npm'
58+
cache-dependency-path: frontend/package-lock.json
59+
60+
- name: Install dependencies
61+
run: npm ci
62+
63+
- name: Lint
64+
run: npm run lint
65+
66+
- name: Unit Tests
67+
run: npm run test:run

frontend/bundle-stats.html

Lines changed: 4950 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)