Skip to content

Commit

Permalink
performance budget
Browse files Browse the repository at this point in the history
  • Loading branch information
tukwan committed Sep 7, 2024
1 parent ce95dfa commit 4e9b01b
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CI

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

jobs:
lhci:
name: Performance Budget
runs-on: ubuntu-latest
environment: Production

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: false

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"

- name: Install dependencies and build
env:
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID }}
run: |
pnpm install --frozen-lockfile
pnpm run build
- name: Run Lighthouse CI
run: |
pnpm install -g @lhci/[email protected]
lhci autorun
env:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
20 changes: 20 additions & 0 deletions lighthouserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"ci": {
"collect": {
"url": ["http://localhost:3000"],
"startServerCommand": "npm run start",
"startServerReadyPattern": "Ready",
"startServerReadyTimeout": 10000,
"numberOfRuns": 3,
"settings": {
"preset": "desktop"
}
},
"assert": {
"preset": "lighthouse:recommended"
},
"upload": {
"target": "temporary-public-storage"
}
}
}

0 comments on commit 4e9b01b

Please sign in to comment.