Lighthouse production audit #6888
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |