Add lighthouse check

Signed-off-by: hossainemruz <hossainemruz@gmail.com>
This commit is contained in:
hossainemruz 2023-11-23 15:08:29 +06:00
parent 434061ea6b
commit 0d03d823f5

View file

@ -49,6 +49,30 @@ jobs:
run: |
npm run lint
lighthouse-check:
runs-on: ubuntu-latest
steps:
- name: Waiting for Netlify Preview
uses: kamranayub/wait-for-netlify-action@v2.1.1
id: preview
with:
site_name: "toha-ci"
max_timeout: 300
env:
NETLIFY_TOKEN: ${{secrets.NETLIFY_TOKEN}}
- name: Run Lighthouse
uses: foo-software/lighthouse-check-action@v10.0.0
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/writing-posts/markdown-syntax/"
# Ensure that PR has desired labels
enforce-label:
runs-on: ubuntu-latest