Skip to content

Commit

Permalink
add lighthouse on cicd workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
aferreira-deo committed Jun 4, 2024
1 parent f991b2c commit 9d344e5
Show file tree
Hide file tree
Showing 11 changed files with 29,670 additions and 17 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,14 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./src

- name: Install necessary packages
run: npm install

- name: Run Lighthouse CI
uses: treosh/lighthouse-ci-action@v11
with:
urls: |
https://aferreira-deo.github.io/jftl-lighthouse-workshop/
configPath: './lighthouserc.js'
temporaryPublicStorage: true # upload lighthouse report to the temporary storage
2,727 changes: 2,727 additions & 0 deletions .lighthouseci/lhr-1717516637236.html

Large diffs are not rendered by default.

7,203 changes: 7,203 additions & 0 deletions .lighthouseci/lhr-1717516637236.json

Large diffs are not rendered by default.

2,727 changes: 2,727 additions & 0 deletions .lighthouseci/lhr-1717516651309.html

Large diffs are not rendered by default.

7,125 changes: 7,125 additions & 0 deletions .lighthouseci/lhr-1717516651309.json

Large diffs are not rendered by default.

2,727 changes: 2,727 additions & 0 deletions .lighthouseci/lhr-1717516662233.html

Large diffs are not rendered by default.

7,125 changes: 7,125 additions & 0 deletions .lighthouseci/lhr-1717516662233.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .lighthouseci/links.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"http://192.168.1.2:8080/": "https://storage.googleapis.com/lighthouse-infrastructure.appspot.com/reports/1717516665250-46998.report.html"
}
16 changes: 0 additions & 16 deletions .lighthouserc.js

This file was deleted.

17 changes: 17 additions & 0 deletions lighthouserc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
ci: {
collect: {
// url: ['http://192.168.1.2:8080'],
url: ['https://aferreira-deo.github.io/jftl-lighthouse-workshop/'],
},
assert: {
assertions: {
'categories:accessibility': ['error', {'minScore': 0.9}]
}
},
upload: {
target: 'temporary-public-storage',
},
},
};

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
{
"scripts": {
"start": "http-server src -p 8080",
"lhci": "lhci autorun"
},
"devDependencies": {
"@lhci/cli": "^0.13.0",
"http-server": "^14.1.1"
Expand Down

0 comments on commit 9d344e5

Please sign in to comment.