mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 15:12:02 +00:00
32 lines
1.5 KiB
Plaintext
32 lines
1.5 KiB
Plaintext
name: Lighthouse production audit
|
|
on:
|
|
# @umpox: Currently disabled whilst migrating to new format
|
|
# workflow_dispatch:
|
|
# schedule:
|
|
# # Every Monday at 12pm UTC
|
|
# - cron: '0 12 * * MON'
|
|
|
|
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: pnpm --ignore-scripts
|
|
|
|
- name: Run Lighthouse
|
|
run: |
|
|
echo -e "*Weekly audit against Sourcegraph.com*\n" > lighthouse_results.txt
|
|
./dev/ci/generate-lighthouse-slack-report.sh ":house: *Homepage*" "https://sourcegraph.com/search" ./lighthouse_results.txt
|
|
./dev/ci/generate-lighthouse-slack-report.sh ":mag_right: *Search results*" "https://sourcegraph.com/search?q=repo:sourcegraph/lighthouse-ci-test-repository+file:index.js" ./lighthouse_results.txt
|
|
./dev/ci/generate-lighthouse-slack-report.sh ":repository: *Repository page*" "https://sourcegraph.com/github.com/sourcegraph/lighthouse-ci-test-repository" ./lighthouse_results.txt
|
|
./dev/ci/generate-lighthouse-slack-report.sh ":code: *File blob*" "https://sourcegraph.com/github.com/sourcegraph/lighthouse-ci-test-repository/-/blob/index.js" ./lighthouse_results.txt
|
|
curl -X POST -H 'Content-type: application/json' --data "{'text':'$(cat ./lighthouse_results.txt)'}" ${{ secrets.LIGHTHOUSE_SLACK_WEBHOOK }}
|