Skip to content

Commit d46462c

Browse files
committed
feat: add lighthouse ci and bundle analyzer
1 parent 636af55 commit d46462c

File tree

6 files changed

+305
-23
lines changed

6 files changed

+305
-23
lines changed

.github/workflows/budget.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[
2+
{
3+
"path": "/*",
4+
"resourceSizes": [
5+
{
6+
"resourceType": "document",
7+
"budget": 18
8+
},
9+
{
10+
"resourceType": "total",
11+
"budget": 200
12+
}
13+
]
14+
}
15+
]

.github/workflows/website.yml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ on:
44
branches:
55
- main
66
paths:
7-
- 'packages/website/**'
8-
- '.github/workflows/website.yml'
9-
- 'package-lock.json'
7+
- "packages/website/**"
8+
- ".github/workflows/website.yml"
9+
- "package-lock.json"
1010
pull_request:
1111
paths:
12-
- 'packages/website/**'
13-
- '.github/workflows/website.yml'
14-
- 'package-lock.json'
12+
- "packages/website/**"
13+
- ".github/workflows/website.yml"
14+
- "package-lock.json"
1515
jobs:
1616
test:
1717
name: Test
@@ -137,6 +137,20 @@ jobs:
137137
138138
[build log](/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> $GITHUB_STEP_SUMMARY
139139
140+
lighthouseci:
141+
needs: preview
142+
runs-on: ubuntu-latest
143+
steps:
144+
- uses: actions/checkout@v2
145+
- name: Audit URLs using Lighthouse
146+
uses: treosh/lighthouse-ci-action@v9
147+
with:
148+
urls: |
149+
${{ steps.cloudflare_url.outputs.stdout }}
150+
budgetPath: ./budget.json # test performance budgets
151+
uploadArtifacts: true # save results as an action artifacts
152+
temporaryPublicStorage: true # upload lighthouse report to the temporary storage
153+
140154
changelog:
141155
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
142156
name: Changelog
@@ -167,7 +181,7 @@ jobs:
167181
- uses: actions/checkout@v2
168182
- uses: actions/setup-node@v2
169183
with:
170-
node-version: '16'
184+
node-version: "16"
171185
registry-url: https://registry.npmjs.org/
172186
- uses: bahmutov/npm-install@v1
173187
- run: npm run build -w packages/client

0 commit comments

Comments
 (0)