Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add lighthouse ci and bundle analyzer #1773

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/budget.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[
{
"path": "/*",
"resourceSizes": [
{
"resourceType": "document",
"budget": 18
},
{
"resourceType": "total",
"budget": 200
}
]
}
]
30 changes: 23 additions & 7 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ on:
branches:
- main
paths:
- 'packages/website/**'
- '.github/workflows/website.yml'
- 'package-lock.json'
- "packages/website/**"
- ".github/workflows/website.yml"
- "package-lock.json"
pull_request:
paths:
- 'packages/website/**'
- '.github/workflows/website.yml'
- 'package-lock.json'
- "packages/website/**"
- ".github/workflows/website.yml"
- "package-lock.json"
jobs:
test:
name: Test
Expand Down Expand Up @@ -75,6 +75,8 @@ jobs:
preview:
name: Preview
runs-on: ubuntu-latest
outputs:
previewurl: ${{ steps.cloudflare_url.outputs.stdout }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
Expand Down Expand Up @@ -137,6 +139,20 @@ jobs:

[build log](/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> $GITHUB_STEP_SUMMARY

lighthouseci:
needs: preview
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Lighthouse
uses: treosh/lighthouse-ci-action@v9
with:
urls: |
${{ needs.preview.outputs.previewurl }}
budgetPath: ./budget.json
uploadArtifacts: true
temporaryPublicStorage: true

changelog:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
name: Changelog
Expand Down Expand Up @@ -167,7 +183,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
node-version: "16"
registry-url: https://registry.npmjs.org/
- uses: bahmutov/npm-install@v1
- run: npm run build -w packages/client
Expand Down
Loading