-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlighthouse.yml
35 lines (27 loc) · 1.12 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
name: lighthouse
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
- name: Install dependencies
run: npm install -g lighthouse http-server && export DISPLAY=$HOST_IP:10.0 && wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && sudo apt install ./google-chrome-stable_current_amd64.deb
- name: Host Website to localhost
run: http-server -g index.html & ls
- name: Audit with Lighthouse
run: lighthouse http://127.0.0.1:8080 --output=html --output-path=./lighthouse-results.html --preset=desktop --chrome-flags="--headless --no-sandbox"
- name: Upload Artifact
uses: actions/upload-artifact@v3.1.0
with:
# Artifact name
name: lighthousereport
path: ./lighthouse-results.html