Skip to content

Commit

Permalink
feat: add lighthouse ci and bundle analyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
e-schneid committed Aug 19, 2022
1 parent 7722acc commit b77b6ad
Show file tree
Hide file tree
Showing 6 changed files with 307 additions and 23 deletions.
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 @@ -136,6 +136,22 @@ jobs:
- ⛅️ ${{ steps.cloudflare_url.outputs.stdout }}
[build log](/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> $GITHUB_STEP_SUMMARY
- outputs:
previewurl: ${{ steps.cloudflare_url.outputs.stdout }}

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'
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

0 comments on commit b77b6ad

Please sign in to comment.