forked from BloomBooks/BloomLibrary2
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (45 loc) · 2.23 KB
/
main.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
name: Lighthouse CI
on:
push:
branches:
- master
jobs:
lighthouse-on-live-site:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Audit root using Lighthouse
uses: treosh/lighthouse-ci-action@v10
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@v10
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