forked from GoogleChrome/developer.chrome.com
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (46 loc) · 1.25 KB
/
lighthouse-ci.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
46
47
48
name: Lighthouse CI
on:
push:
branches:
- main
pull_request:
paths:
- '**.js'
- 'package.json'
- '**.njk'
- '**.scss'
jobs:
lhci:
if: ${{ github.repository == 'GoogleChrome/developer.chrome.com' }}
runs-on: ubuntu-latest
env:
# Increase RAM limit, and make uncaught exceptions crash (default in 16+).
NODE_OPTIONS: --max_old_space_size=4096 --unhandled-rejections=strict
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Cache node_modules
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install
run: npm ci
- name: Build
env:
ELEVENTY_IGNORE_NACL: true
run: npm run production
- name: Lighthouse CI
env:
ELEVENTY_ENV: production
run: |
npx lhci autorun \
--config=./lighthouserc.js \
--upload.serverBaseUrl=${{ secrets.LHCI_SERVER }} \
--upload.token=${{ secrets.LHCI_TOKEN }}