Skip to content

Commit

Permalink
Add lighthouse ci pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
marshallku committed Feb 26, 2024
1 parent 2f434fd commit f54aed2
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,20 @@ jobs:
- uses: marshallku/actions/setup-pnpm@master
- name: Build apps and packages
run: pnpm build
lighthouse:
name: Lighthouse CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: marshallku/actions/setup-pnpm@master
- name: Run Lighthouse CI
env:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
run: |
cd apps/blog
pnpm build
pnpm add -G @lhci/cli
lhci autorun
send-notification:
needs: [check-spelling, lint-all, build-all]
if: ${{ failure() }}
Expand Down
23 changes: 23 additions & 0 deletions apps/blog/lighthouserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"ci": {
"collect": {
"startServerCommand": "pnpm start --filter @marshallku/blog",
"startServerReadyPattern": "ready on",
"url": ["http://localhost:3000"],
"numberOfRuns": 5,
"settings": {
"preset": "desktop"
}
},
"assert": {
"preset": "lighthouse:recommended",
"assertions": {
"categories:performance": ["warn", { "minScore": 0.95 }],
"categories:accessibility": ["error", { "minScore": 0.9 }]
}
},
"upload": {
"target": "temporary-public-storage"
}
}
}

0 comments on commit f54aed2

Please sign in to comment.