-
Notifications
You must be signed in to change notification settings - Fork 90
31 lines (31 loc) · 1.04 KB
/
lighthouse.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
name: CI
on:
pull_request:
branches:
- "**"
jobs:
lhci:
name: Lighthouse
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install dependencies
run: |
npm install
npm run build
- name: run Lighthouse CI for the Application
run: |
npm install -g @lhci/[email protected]
lhci autorun --config=lighthouserc.json --collect.url="http://localhost:3000" --collect.startServerCommand="npm run start" --upload.outputDir="./lhci-reports/app"
- name: run Lighthouse CI for Keploy.io Deployed Website
run: |
git checkout main
npm install -g @lhci/[email protected]
lhci autorun --config=lighthouserc.json --collect.url="http://localhost:3000" --collect.startServerCommand="npm run start" --upload.outputDir="./lhci-reports/main"
- name: Compare Lighthouse Reports
run: |
node compare-lhci-reports.js