-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5454f0c
commit d43b9c6
Showing
4 changed files
with
168 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ci: | ||
collect: | ||
settings: | ||
emulatedFormFactor: desktop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: Lighthouse Performance | ||
|
||
on: | ||
pull_request: | ||
branches: [develop, main] | ||
|
||
jobs: | ||
# vercel will deploy a preview branch and domain for this PR | ||
# wait for new deployment to complete before running lighthouse | ||
wait-for-vercel-deployment: | ||
name: Wait for vercel deployment | ||
runs-on: ubuntu-latest | ||
outputs: | ||
preview_url: ${{ steps.waitForVercelDeployment.outputs.url }} | ||
steps: | ||
- name: Wait for Vercel preview deployment to be ready | ||
uses: patrickedqvist/[email protected] | ||
id: waitForVercelDeployment | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
max_timeout: 1000 | ||
check_interval: 5 | ||
|
||
lighthouse-mobile: | ||
runs-on: ubuntu-latest | ||
needs: wait-for-vercel-deployment | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Audit URLs using Lighthouse | ||
uses: treosh/lighthouse-ci-action@v10 | ||
with: | ||
urls: | | ||
${{ needs.wait-for-vercel-deployment.outputs.preview_url }} | ||
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/activities | ||
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/chat | ||
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/grounding | ||
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/notes | ||
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/therapy | ||
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/courses | ||
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/courses/image-based-abuse-and-rebuilding-ourselves | ||
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/courses/dating-boundaries-and-relationships | ||
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/courses/recovering-from-toxic-and-abusive-relationships | ||
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/courses/image-based-abuse-and-rebuilding-ourselves/the-social-context-of-image-based-abuse-and-victim-blaming | ||
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/courses/dating-boundaries-and-relationships/emotional-boundaries | ||
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/courses/recovering-from-toxic-and-abusive-relationships/introduction-and-what-you-should-know | ||
budgetPath: ./lighthouse_budget.json # test performance budgets | ||
uploadArtifacts: true # save results as an action artifacts | ||
|
||
lighthouse-desktop: | ||
runs-on: ubuntu-latest | ||
needs: wait-for-vercel-deployment | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Audit URLs using Lighthouse | ||
uses: treosh/lighthouse-ci-action@v10 | ||
with: | ||
urls: | | ||
${{ needs.wait-for-vercel-deployment.outputs.preview_url }} | ||
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/activities | ||
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/chat | ||
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/grounding | ||
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/notes | ||
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/therapy | ||
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/courses | ||
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/courses/image-based-abuse-and-rebuilding-ourselves | ||
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/courses/dating-boundaries-and-relationships | ||
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/courses/recovering-from-toxic-and-abusive-relationships | ||
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/courses/image-based-abuse-and-rebuilding-ourselves/the-social-context-of-image-based-abuse-and-victim-blaming | ||
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/courses/dating-boundaries-and-relationships/emotional-boundaries | ||
${{ needs.wait-for-vercel-deployment.outputs.preview_url }}/courses/recovering-from-toxic-and-abusive-relationships/introduction-and-what-you-should-know | ||
budgetPath: ./lighthouse_desktop_budget.json # test performance budgets | ||
uploadArtifacts: true # save results as an action artifacts | ||
configPath: '.github/configs/lighthouse-desktop-rc.yml' # set lighthouse config | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
[ | ||
{ | ||
"path": "/*", | ||
"resourceSizes": [ | ||
{ | ||
"resourceType": "document", | ||
"budget": 18 | ||
}, | ||
{ | ||
"resourceType": "total", | ||
"budget": 200 | ||
}, | ||
{ | ||
"resourceType": "script", | ||
"budget": 150 | ||
} | ||
], | ||
"timings": [ | ||
{ | ||
"metric": "first-meaningful-paint", | ||
"budget": 2000 | ||
}, | ||
{ | ||
"metric": "first-contentful-paint", | ||
"budget": 1800 | ||
}, | ||
{ | ||
"metric": "largest-contentful-paint", | ||
"budget": 10000 | ||
}, | ||
{ | ||
"metric": "interactive", | ||
"budget": 4000 | ||
}, | ||
{ | ||
"metric": "total-blocking-time", | ||
"budget": 2500 | ||
}, | ||
{ | ||
"metric": "speed-index", | ||
"budget": 3000 | ||
} | ||
] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
[ | ||
{ | ||
"path": "/*", | ||
"resourceSizes": [ | ||
{ | ||
"resourceType": "document", | ||
"budget": 18 | ||
}, | ||
{ | ||
"resourceType": "total", | ||
"budget": 200 | ||
}, | ||
{ | ||
"resourceType": "script", | ||
"budget": 150 | ||
} | ||
], | ||
"timings": [ | ||
{ | ||
"metric": "first-meaningful-paint", | ||
"budget": 2000 | ||
}, | ||
{ | ||
"metric": "first-contentful-paint", | ||
"budget": 600 | ||
}, | ||
{ | ||
"metric": "largest-contentful-paint", | ||
"budget": 4000 | ||
}, | ||
{ | ||
"metric": "interactive", | ||
"budget": 2000 | ||
}, | ||
{ | ||
"metric": "total-blocking-time", | ||
"budget": 500 | ||
}, | ||
{ | ||
"metric": "speed-index", | ||
"budget": 2000 | ||
} | ||
] | ||
} | ||
] |