tests: run lighthouse against preview deployments in CI (#107)
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
name: live
|
||||
|
||||
on: [deployment_status]
|
||||
|
||||
jobs:
|
||||
lighthouse:
|
||||
name: lighthouse
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.deployment_status.state == 'success' && github.event.deployment_status.creator.login == 'deno-deploy[bot]'
|
||||
|
||||
env:
|
||||
URL: ${{ github.event.deployment_status.environment_url }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Install Node.js 16.x
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 16.x
|
||||
|
||||
- name: Install Lighthouse CI
|
||||
run: npm install -g @lhci/cli@0.9.x
|
||||
|
||||
- name: Run Lighthouse
|
||||
run: lhci autorun --collect.url="$URL" --upload.target="temporary-public-storage"
|
||||
env:
|
||||
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
|
||||
Reference in New Issue
Block a user