Skip to content

Commit

Permalink
FIX: Old Chromium doesn't emit LCP metric
Browse files Browse the repository at this point in the history
  • Loading branch information
dooman87@gmail.com authored and dooman87@gmail.com committed May 27, 2020
1 parent 7ada802 commit e7c9f75
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.idea
*.iml
*.iml
.lighthouseci/*.json
.lighthouseci/*.html
Empty file added .lighthouseci/.empty
Empty file.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:12.13-alpine3.10
FROM node:12.17-alpine3.11

RUN apk add --no-cache chromium
RUN npm install -g @lhci/cli@0.4.0
Expand All @@ -10,5 +10,9 @@ RUN addgroup lhci \
--home /home/lhci \
--ingroup lhci \
lhci

USER lhci
WORKDIR /home/lhci

RUN mkdir .lighthouseci
VOLUME .lighthouseci
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ Docker image for [Lighthouse CI CLI](https://github.com/GoogleChrome/lighthouse-

## Usage

### Locally

```
docker run -it --rm -v $(pwd)/example:/home/lhci/example -v $(pwd)/.lighthouseci:/home/lhci/.lighthouseci lhci lhci --config ./example/lighthouserc.example.yaml autorun
```

### In CI Pipeline
We are using this image in our Bitbucket Pipeline as a step to run LH tests and then upload results to
Google Cloud Storage.

Expand Down
15 changes: 15 additions & 0 deletions example/lighthouserc.example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ci:
collect:
additive: false
url:
- https://pixboost.com
settings:
chrome-flags: "--no-sandbox --headless"
throttling-method: simulate
# https://github.com/GoogleChrome/lighthouse/blob/8f500e00243e07ef0a80b39334bedcc8ddc8d3d0/lighthouse-core/config/constants.js#L19-L26
throttling:
throughputKbps: 1638
uploadThroughputKbps: 675
cpuSlowdownMultiplier: 4
assert:
preset: lighthouse:no-pwa

0 comments on commit e7c9f75

Please # to comment.