-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlighthouserc.js
52 lines (50 loc) · 1.84 KB
/
lighthouserc.js
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
48
49
50
51
52
"use strict";
const runningOnCi = process.env.CI === "true" ? "off" : "on";
module.exports = {
ci: {
collect: {
startServerCommand: "MICRONAUT_ENVIRONMENTS=baremetal ./gradlew run",
startServerReadyPattern: "Startup completed",
startServerReadyTimeout: 90000, // 90 seconds. More than enough for CI.
settings: {
maxWaitForLoad: 10000, // 10 seconds
chromeFlags: "--headless=new"
},
url: [
"http://localhost:8080/",
"http://localhost:8080/obras",
"http://localhost:8080/contato",
"http://localhost:8080/equipe",
"http://localhost:8080/obra/1",
"http://localhost:8080/obra/1/pagina/2",
]
},
assert: {
preset: "lighthouse:no-pwa",
assertions: {
"offscreen-images": "off",
"identical-links-same-purpose": "off",
// TODO: try to solve these later
"heading-order": "off",
"image-size-responsive": "off",
"render-blocking-resources": "off",
"first-contentful-paint": "off",
"largest-contentful-paint": "off",
"total-byte-weight": "off",
// Only failing at CI:
"tap-targets": runningOnCi,
"target-size": runningOnCi,
}
},
upload: {
target: "lhci",
serverBaseUrl: "https://liber-lighthouse-server.up.railway.app",
token: process.env.PROJECT_TOKEN,
githubToken: process.env.GITHUB_TOKEN,
basicAuth: {
username: process.env.BASIC_AUTH_USERNAME,
password: process.env.BASIC_AUTH_PASSWORD,
}
}
},
};