Skip to content
This repository has been archived by the owner on Sep 8, 2024. It is now read-only.

Commit

Permalink
Add Google Lighthouse
Browse files Browse the repository at this point in the history
  • Loading branch information
l3d00m committed Jul 20, 2023
1 parent 604fb06 commit 152c916
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Lighthouse

on:
push:
branches:
- "main"
pull_request:

jobs:
lighthouse:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
with:
fetch-depth: 0
- uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3
with:
node-version-file: ".nvmrc"
cache: "yarn"

- name: Install dependencies 📦
run: yarn install --immutable
- name: Run build
run: yarn run build
- name: Run Lighthouse tests
run: |
npm install -g @lhci/[email protected]
lhci autorun
env:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
20 changes: 20 additions & 0 deletions lighthouserc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
ci: {
collect: {
startServerCommand: "npm run start",

Check warning on line 4 in lighthouserc.js

View workflow job for this annotation

GitHub Actions / ci

Strings must use singlequote

Check warning on line 4 in lighthouserc.js

View workflow job for this annotation

GitHub Actions / ci

Strings must use singlequote
url: [
"http://localhost:3000/",

Check warning on line 6 in lighthouserc.js

View workflow job for this annotation

GitHub Actions / ci

Strings must use singlequote

Check warning on line 6 in lighthouserc.js

View workflow job for this annotation

GitHub Actions / ci

Strings must use singlequote
"http://localhost:3000/login",

Check warning on line 7 in lighthouserc.js

View workflow job for this annotation

GitHub Actions / ci

Strings must use singlequote

Check warning on line 7 in lighthouserc.js

View workflow job for this annotation

GitHub Actions / ci

Strings must use singlequote
"http://localhost:3000/add",

Check warning on line 8 in lighthouserc.js

View workflow job for this annotation

GitHub Actions / ci

Strings must use singlequote

Check warning on line 8 in lighthouserc.js

View workflow job for this annotation

GitHub Actions / ci

Strings must use singlequote
"http://localhost:3000/edit",

Check warning on line 9 in lighthouserc.js

View workflow job for this annotation

GitHub Actions / ci

Strings must use singlequote

Check warning on line 9 in lighthouserc.js

View workflow job for this annotation

GitHub Actions / ci

Strings must use singlequote
"http://localhost:3000/view",

Check warning on line 10 in lighthouserc.js

View workflow job for this annotation

GitHub Actions / ci

Strings must use singlequote

Check warning on line 10 in lighthouserc.js

View workflow job for this annotation

GitHub Actions / ci

Strings must use singlequote
"http://localhost:3000/find",

Check warning on line 11 in lighthouserc.js

View workflow job for this annotation

GitHub Actions / ci

Strings must use singlequote

Check warning on line 11 in lighthouserc.js

View workflow job for this annotation

GitHub Actions / ci

Strings must use singlequote
"http://localhost:3000/manage/users",
"http://localhost:3000/manage/reports",
],
},
upload: {
target: "temporary-public-storage",
},
},
};

0 comments on commit 152c916

Please sign in to comment.