forked from GoogleChrome/lighthouse-ci
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
51 lines (51 loc) · 1.32 KB
/
.travis.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
49
50
51
branches:
only:
- master # Only build master and PRs
git:
depth: false # ensure we have full git history for our build-context.js tests
cache:
yarn: true
directories:
- node_modules
stages:
- test
jobs:
include:
- &base-test
os: osx
language: node_js
node_js: v10
stage: test
script:
- yarn build
- yarn test:unit
before_cache:
# nyc, jest and other projects store files in here. They mess up the travis build cache.
- rm -rf ./node_modules/.cache/
addons:
chrome: stable
- <<: *base-test
os: windows
before_install:
- export LHCI_GITHUB_TOKEN="" # prevent any accidental leaking of the token
- choco install googlechrome
before_script:
- ps -W | sort
after_script:
- ps -W | sort
env: YARN_GPG=no
- <<: *base-test
os: linux
before_script:
- google-chrome-stable --version
- export CHROME_PATH="$(which google-chrome-stable)"
- export POSTGRES_DB_URL="postgres://postgres@localhost/lighthouse_ci_test"
- export RUN_E2E_TESTS="true"
- psql -c 'create database lighthouse_ci_test;' -U postgres
script:
- yarn build
- yarn test
- yarn ci:dogfood
services:
- postgresql
- xvfb