-
-
Notifications
You must be signed in to change notification settings - Fork 6
50 lines (48 loc) · 2.51 KB
/
lighthouse.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Lighthouse CI
on:
workflow_run:
workflows: ["Build and Deploy"]
types:
- completed
workflow_dispatch: # Allows manual triggering of the workflow
jobs:
lighthouse-on-live-site:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' || (github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'master') }}
steps:
- uses: actions/checkout@v4
- name: Audit root using Lighthouse
uses: treosh/lighthouse-ci-action@v12
with:
urls: |
https://alpha.bloomlibrary.org
runs: 3
budgetPath: ./.github/workflows/lighthouse-budget.json # test performance budgets
uploadArtifacts: true # save results as action artifacts
temporaryPublicStorage: true # upload lighthouse report to the temporary storage
# We have to run this separately with a separate budget file because the redirect causes
# lighthouse to think we are running at the root
- name: Audit /covid19 using Lighthouse
uses: treosh/lighthouse-ci-action@v12
with:
urls: |
https://alpha.bloomlibrary.org/covid19
runs: 3
budgetPath: ./.github/workflows/lighthouse-budget-covid19-page.json # test performance budgets
uploadArtifacts: true # save results as action artifacts
temporaryPublicStorage: true # upload lighthouse report to the temporary storage
# This static directory test doesn't work (at least) because we don't build the site in the action.
# If we implemented it (and it worked...), it would have the advantage of immediate results instead
# of always being one deploy behind like the live site test.
# lighthouse-on-static-directory:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Audit URLs using Lighthouse
# uses: treosh/lighthouse-ci-action@v10
# with:
# configPath: ./.github/workflows/lighthouserc.json
# runs: 3
# budgetPath: ./.github/workflows/lighthouse-budget.json # test performance budgets
# uploadArtifacts: true # save results as action artifacts
# temporaryPublicStorage: true # upload lighthouse report to the temporary storage