Skip to content

Commit

Permalink
ci: add lighthouse ci
Browse files Browse the repository at this point in the history
  • Loading branch information
pure-js committed Sep 18, 2023
1 parent e8fe65e commit 5db2ad2
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Lighthouse CI

on: [push]

env:
VITE_GROWTH_BOOK_KEY: 'some-key'

jobs:
lighthouseci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- run: bun install --frozen-lockfile && bun install -g @lhci/[email protected]
- run: bun run build
- run: lhci autorun
env:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
16 changes: 16 additions & 0 deletions lighthouserc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
ci:
collect:
numberOfRuns: 3
startServerCommand: bun run preview
url: ['http://localhost']
staticDistDir: './dist'
isSinglePageApplication: true
assert:
assertions:
'categories:performance': ['error', { 'minScore': 1 }]
'categories:accessibility': ['error', { 'minScore': 1 }]
'categories:best-practices': ['error', { 'minScore': 1 }]
'categories:pwa': ['off']
'categories:seo': ['error', { 'minScore': 1 }]
upload:
target: 'temporary-public-storage'

0 comments on commit 5db2ad2

Please sign in to comment.