forked from ampproject/amphtml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
116 lines (116 loc) · 3.39 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
language: node_js
dist: xenial
node_js:
- 'lts/*'
python:
- '2.7'
notifications:
email:
recipients:
on_success: change
on_failure: change
before_install:
# Override Xenial's default Java version (github.com/travis-ci/travis-ci/issues/10290)
- export PATH=$(echo "$PATH" | sed -e 's/:\/usr\/local\/lib\/jvm\/openjdk11\/bin//')
- export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64
- pip install --user protobuf
branches:
only:
- master
- release
- canary
- /^amp-release-.*$/
addons:
apt:
packages:
# Use unbuffer (from expect-dev) for log coloring (github.com/travis-ci/travis-ci/issues/7967)
- expect-dev
- google-cloud-sdk
- openssl
- protobuf-compiler
chrome: stable
hosts:
- ads.localhost
- iframe.localhost
# CURLs amp subdomain for the amp-recaptcha-input integration test. The hash
# is the CURLS subdomain for localhost:9876
- jgla3zmib2ggq5buc4hwi5taloh6jlvzukddfr4zltz3vay5s5rq.recaptcha.localhost
# Requested by some tests because they need a valid font host,
# but should not resolve in tests.
- fonts.googleapis.com
stages:
- name: build
- name: test
- name: experiment
if: type = push
jobs:
include:
- stage: build
name: 'Build'
script:
- unbuffer node build-system/pr-check/build.js
- stage: build
name: 'Checks'
script:
- unbuffer node build-system/pr-check/checks.js
- stage: build
name: 'Validator Tests'
script:
- unbuffer node build-system/pr-check/validator-tests.js
- stage: build
name: 'Dist, Bundle Size'
script:
- unbuffer node build-system/pr-check/dist-bundle-size.js
- stage: test
name: 'Single Pass Tests'
script:
- unbuffer node build-system/pr-check/single-pass-tests.js
- stage: test
name: 'Visual Diff Tests'
script:
- unbuffer node build-system/pr-check/visual-diff-tests.js
env:
- CACHE_NAME=VISUALDIFFJOB
- stage: test
name: 'Local Tests'
script:
- unbuffer node build-system/pr-check/local-tests.js
- stage: test
name: 'Remote (Sauce Labs) Tests'
script:
- unbuffer node build-system/pr-check/remote-tests.js
after_script:
- build-system/sauce_connect/stop_sauce_connect.sh
- ps -ef
- stage: test
name: 'End to End Tests'
script:
- unbuffer node build-system/pr-check/e2e-tests.js
env:
- CACHE_NAME=E2EJOB
- stage: experiment
name: 'Experiment A Tests'
script:
- unbuffer node build-system/pr-check/experiment-tests.js --experiment=experimentA
- stage: experiment
name: 'Experiment B Tests'
script:
- unbuffer node build-system/pr-check/experiment-tests.js --experiment=experimentB
- stage: experiment
name: 'Experiment C Tests'
script:
- unbuffer node build-system/pr-check/experiment-tests.js --experiment=experimentC
before_cache:
# do not store cache for pr builds
- if [[ $TRAVIS_EVENT_TYPE == pull_request ]]; then exit $TRAVIS_TEST_RESULT ; fi
cache:
directories:
- node_modules
- build-system/tasks/e2e/node_modules
- build-system/tasks/visual-diff/node_modules
- sauce_connect
- validator/node_modules
- validator/nodejs/node_modules
- validator/webui/node_modules
yarn: true