-
Notifications
You must be signed in to change notification settings - Fork 3
37 lines (32 loc) · 1.43 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
name: Lighthouse production audit
on:
workflow_dispatch:
schedule:
# Every 4 hours
- cron: '0 */4 * * *'
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# set up correct version of node
- id: nvmrc
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
- uses: actions/setup-node@v2
with: { node-version: '${{ steps.nvmrc.outputs.NODE_VERSION }}' }
- name: Install dependencies
run: yarn --ignore-engines --ignore-scripts
- name: Run Lighthouse
working-directory: ./packages/web-performance
run: |
./report.sh ":house: *Homepage*" "https://sourcegraph.com/search" ./reports/homepage.json
./report.sh ":mag_right: *Search results*" "https://sourcegraph.com/search?q=repo:sourcegraph/smoke-tests-test-repository+file:index.js" ./reports/search.json
./report.sh ":repository: *Repository page*" "https://sourcegraph.com/github.com/sourcegraph/smoke-tests-test-repository" ./reports/repository.json
./report.sh ":code: *File blob*" "https://sourcegraph.com/github.com/sourcegraph/smoke-tests-test-repository/-/blob/index.js" ./reports/file_blob.json
- name: Commit results
run: |
git config --global user.name 'Sourcegraph Bot'
git config --global user.email '[email protected]'
git add .
git commit -m "Lighthouse results"
git push