-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (38 loc) · 1.13 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Lighthouse Performance Test
on:
push:
branches:
- feat/lighthouse
pull_request:
branches:
- feat/lighthouse
jobs:
lighthouse:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install Lighthouse
run: npm install -g lighthouse
- name: Start local server
run: |
# Adjust this command to start your local server
npm install
npm start &
sleep 15
- name: Run Lighthouse on local site
id: lighthouse-local
run: lighthouse http://localhost:3000 --output html --output-path ./lighthouse-local.html --output json --output-path ./lighthouse-local.json
- name: Display local Lighthouse report
run: cat ./lighthouse-local.json | jq
- name: Upload Lighthouse results
uses: actions/upload-artifact@v2
with:
name: lighthouse-results
path: |
lighthouse-local.html
lighthouse-local.json