generated from theholocron/node-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (49 loc) · 1.36 KB
/
audit.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
56
57
58
59
60
61
name: Audit
# @TODO: add in more things like:
# - [ ] dead css checks
on: # yamllint disable-line rule:truthy
- push
jobs:
bundle-size:
name: Audit the bundle size
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Checkout repository
with:
fetch-depth: 0
- uses: actions/setup-node@v4
name: Setup Node.js @v20
with:
cache: npm
node-version: 20.x
- run: npm ci
name: Install dependencies
- uses: jackyef/bundlewatch-gh-action@0.3.0
name: Analyze using BundleWatch
with:
build-script: npm run build
bundlewatch-github-token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
performance:
name: Audit the performance
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Checkout repository
with:
fetch-depth: 0
- uses: actions/setup-node@v4
name: Setup Node.js @v20
with:
cache: npm
node-version: 20.x
- run: npm ci
name: Install dependencies
- run: npm install -g @lhci/cli@0.14.x
name: Install Lighthouse CLI
- run: npm run build
name: Build project
- run: lhci autorun
name: Run Lighthouse CI
env:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}