Skip to content

Commit

Permalink
Add lighthouse score check (#837)
Browse files Browse the repository at this point in the history
* Add lighthouse check

Signed-off-by: hossainemruz <[email protected]>

* Fix URL

Signed-off-by: hossainemruz <[email protected]>

---------

Signed-off-by: hossainemruz <[email protected]>
  • Loading branch information
hossainemruz authored Nov 23, 2023
1 parent 434061e commit 93dc9db
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,30 @@ jobs:
run: |
npm run lint
lighthouse-check:
runs-on: ubuntu-latest
steps:
- name: Waiting for Netlify Preview
uses: kamranayub/[email protected]
id: preview
with:
site_name: "toha-ci"
max_timeout: 300
env:
NETLIFY_TOKEN: ${{secrets.NETLIFY_TOKEN}}

- name: Run Lighthouse
uses: foo-software/[email protected]
id: lighthouseCheck
with:
accessToken: ${{ secrets.LIGHTHOUSE_TOKEN }}
gitHubAccessToken: ${{secrets.GITHUB_TOKEN}}
emulatedFormFactor: 'all'
prCommentEnabled: true
prCommentSaveOld: false
timeout: 5
urls: "${{ steps.preview.outputs.url }},${{ steps.preview.outputs.url }}/posts/,${{ steps.preview.outputs.url }}/posts/markdown-sample/,${{ steps.preview.outputs.url }}/posts/shortcodes/"

# Ensure that PR has desired labels
enforce-label:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 93dc9db

Please sign in to comment.