1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2026-04-17 10:08:43 -04:00

run lighthouse-ci via action [skip ci]

This commit is contained in:
2020-03-28 21:45:44 -04:00
parent bc3e1f9309
commit 5e5678a699
5 changed files with 80 additions and 3 deletions

37
.github/workflows/lighthouse.yml vendored Normal file
View File

@@ -0,0 +1,37 @@
name: Lighthouse
on: [push, pull_request]
jobs:
lhci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x
# https://github.com/actions/cache/blob/master/examples.md#node---yarn
# https://github.com/actions/cache/issues/60
- name: Get yarn cache location
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: |
yarn install --no-ignore-optional --frozen-lockfile
# - uses: jakepartusch/wait-for-netlify-action@v1
# id: wait
# with:
# site_name: "jakejarvis"
- name: Run Lighthouse CI
run: |
npm install -g @lhci/cli@0.3.x
lhci autorun --config=./lighthouserc.json
env:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}