Skip to content

Commit

Permalink
feat: Add Lighthouse CI
Browse files Browse the repository at this point in the history
  • Loading branch information
flozia committed Oct 28, 2024
1 parent 682353b commit 8771b4b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,6 @@ next-env.d.ts
# Glean
.venv
/src/telemetry/generated/

# Lighthouse CI
.lighthouseci
20 changes: 20 additions & 0 deletions lighthouserc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

const SERVER_URL = "http://localhost:3000";
const pages = ["/", "/breaches"];

const lighthouseConfig = {
ci: {
collect: {
startServerCommand: "npm run start",
url: pages.map((pathname) => `${SERVER_URL}${pathname}`),
},
upload: {
target: "lhci",
},
},
};

module.exports = lighthouseConfig;
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
"build-glean-frontend-docs": "glean translate src/telemetry/metrics.yaml --format markdown --output docs/telemetry/frontent",
"build-glean-backend-docs": "glean translate src/telemetry/backend-metrics.yaml --format markdown --output docs/telemetry/backend",
"loadtest:hbibp-webhook": "echo 'Ensure k6 is installed; see:\n\thttps://grafana.com/docs/k6/latest/set-up/install-k6/\n' && k6 run src/scripts/loadtest/hibp.js",
"validate-nimbus": "sh src/scripts/build/validate-nimbus-file.sh"
"validate-nimbus": "sh src/scripts/build/validate-nimbus-file.sh",
"lighthouse": "lhci autorun"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 8771b4b

Please sign in to comment.