Skip to content

Commit a3dd397

Browse files
committed
feat: cherry picking the Lighthouse CI-specific updates from #1579
1 parent fcabd59 commit a3dd397

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,20 @@ jobs:
7070

7171
# quicker build + Nightwatch tests for feature branches
7272
- stage: Pre-deploy
73-
name: 'Build + Deploy Website (Quick)'
73+
name: 'Build + Deploy Website + Lighthouse CLI'
7474
if: (NOT tag =~ ^v) AND (NOT branch =~ /(master|release|bug|fix)/)
7575
install:
7676
- npx json -I -f package.json -e 'delete this.dependencies'
7777
- npx json -I -f package.json -e 'delete this.scripts.postinstall'
7878
- yarn run setup
7979
- npx lerna run postbootstrap
80+
- yarn global add @lhci/cli@0.3.x
8081
script:
8182
- yarn run build
8283
- yarn run deploy
8384
- export NOW_URL=$(./scripts/get-latest-deploy.js)
8485
- travis_retry yarn run test:e2e:quick
86+
- lhci autorun --collect.numberOfRuns=3 --collect.url=$NOW_URL --collect.url=$NOW_URL/pattern-lab/patterns/04-pages-10-d8-product-pages-product-t2/04-pages-10-d8-product-pages-product-t2.html --collect.url=$NOW_URL/pattern-lab/patterns/06-experiments-micro-journeys-90-micro-journeys/06-experiments-micro-journeys-90-micro-journeys.html
8587
after_success:
8688
- ./scripts/deploy-branch-alias.js
8789

lighthouserc.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"ci": {
3+
"assert": {
4+
"preset": "lighthouse:no-pwa",
5+
"assertions": {
6+
"unused-css-rules": "warn",
7+
"button-name": "warn",
8+
"external-anchors-use-rel-noopener": "warn",
9+
"meta-description": "warn",
10+
"no-document-write": "warn",
11+
"offscreen-images": "warn",
12+
"uses-rel-preconnect": "warn",
13+
"dom-size": "warn",
14+
"aria-required-attr": "warn",
15+
"aria-required-children": "warn",
16+
"aria-valid-attr-value": "warn",
17+
"image-alt": "warn",
18+
"label": "warn",
19+
"list": "warn",
20+
"listitem": "warn",
21+
"link-name": "warn"
22+
}
23+
},
24+
"upload": {
25+
"target": "temporary-public-storage"
26+
}
27+
}
28+
}

0 commit comments

Comments
 (0)