-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Description
The Lighthouse example in the README could be improved:
- the npm install and build steps are unnecessary (other than the global install of
lchi/cli), since we are testing against Netlify - if using the Lighthouse CI Github App to get Github Status Checks fed back to the PR, the checkout step needs to get its ref from
github.event.pull_request.head.shaand the final step needs to get theLHCI_GITHUB_APP_TOKENfrom the repo's secrets and supply it toenv.
name: Lighthouse
on: pull_request
jobs:
netlify-deploy-preview:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Read .nvmrc version
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
id: nvm
- name: Set Node.js version
uses: actions/setup-node@v1
with:
node-version: "${{ steps.nvm.outputs.NVMRC }}"
- name: Wait for Netlify Preview
uses: jakepartusch/[email protected]
id: netlify
with:
site_name: 'your-netlify-site-name'
max_timeout: 300
- name: Lighthouse CI
run: |
npm install -g @lhci/cli
lhci autorun --upload.target=temporary-public-storage --collect.url=${{ steps.netlify.outputs.url }} || echo "LHCI failed!"
env:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}Metadata
Metadata
Assignees
Labels
No labels