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 2bc3243
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 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
9 changes: 9 additions & 0 deletions .lighthouserc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const { assert } = require("console");

module.exports = {
ci: {
collect: {
Expand All @@ -6,6 +8,13 @@ module.exports = {
// url: ['https://aferreira-deo.github.io/jftl/'],
},
assert: {
assertions: {
categories: {
accessibility: {
error: [{'minScore': 0.45}]
}
}
},
preset: 'lighthouse:recommended',
},
upload: {
Expand Down

0 comments on commit 2bc3243

Please sign in to comment.