Skip to content

Commit fb385de

Browse files
committed
run lighthouse tests on desktop instead of mobile
1 parent a1293c5 commit fb385de

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

.github/workflows/lighthouse.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,13 @@ jobs:
1818
lfs: false
1919
- uses: actions/setup-node@v2
2020
with:
21-
node-version: 14.x
22-
- run: npm install -g @lhci/cli
21+
node-version: 12.x
22+
- uses: browser-actions/setup-chrome@latest
23+
with:
24+
chrome-version: stable
25+
- run: PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true npm install -g @lhci/cli
2326
- run: |
24-
lhci healthcheck
27+
chrome --version
2528
lhci --version
2629
curl $LHCI_SERVER_BASE_URL/version
2730
echo "ref: ${{ github.event.deployment.ref }}"

.lighthouserc.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
{
22
"ci": {
33
"collect": {
4-
"numberOfRuns": 3
4+
"numberOfRuns": 3,
5+
"settings": {
6+
"preset": "desktop",
7+
"chromeFlags": "--no-sandbox"
8+
}
59
},
610
"assert": {
711
"preset": "lighthouse:no-pwa",
812
"assertions": {
9-
"color-contrast": "warn",
1013
"csp-xss": "warn",
11-
"errors-in-console": "warn",
12-
"inspector-issues": "warn",
1314
"link-text": "warn",
1415
"long-tasks": "warn",
15-
"non-composited-animations": "warn",
1616
"total-byte-weight": ["warn", {"minScore": 0.9}],
17-
"unminified-javascript": "warn",
1817
"unsized-images": "warn",
1918
"unused-css-rules": "warn",
2019
"unused-javascript": "warn",
@@ -25,7 +24,8 @@
2524
"uses-long-cache-ttl": "off",
2625
"uses-responsive-images": "off",
2726
"uses-webp-images": "off"
28-
}
27+
},
28+
"includePassedAssertions": true
2929
},
3030
"upload": {
3131
"target": "lhci",

0 commit comments

Comments
 (0)