diff --git a/.travis.yml b/.travis.yml index 83a2cdeb1baa..b3d4eafbd12a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: node_js -dist: trusty +dist: xenial node_js: - "lts/*" python: @@ -13,10 +13,10 @@ notifications: webhooks: - http://savage.nonblocking.io:8080/savage/travis before_install: - - curl -o- -L https://yarnpkg.com/install.sh | bash - - export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" - - pip install urllib3[secure] - - pip install gsutil --user + - pip install --user gsutil protobuf urllib3[secure] + # 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 branches: only: - master @@ -25,12 +25,16 @@ branches: - /^amp-release-.*$/ - /^revert-.*$/ addons: + apt: + packages: + - protobuf-compiler + - python-protobuf + chrome: stable hosts: - ads.localhost - iframe.localhost - # CURLs amp subdomain for amp-recaptcha-input, - # integration tests. The hash is the - # CURLS subdomain for localhost:9876 + # 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. @@ -50,15 +54,8 @@ jobs: - node build-system/pr-check/checks.js - stage: build name: "Validator Tests" - before_script: - - pip install --user protobuf script: - node build-system/pr-check/validator-tests.js - addons: - apt: - packages: - - protobuf-compiler - - python-protobuf - stage: build name: "Dist" if: type != pull_request @@ -66,8 +63,6 @@ jobs: - node build-system/pr-check/dist.js - stage: test name: "Dist, Bundle Size, Single Pass Tests" - addons: - chrome: stable script: - node build-system/pr-check/dist-tests.js - stage: test @@ -76,8 +71,6 @@ jobs: - node build-system/pr-check/visual-diff-tests.js - stage: test name: "Local Tests" - addons: - chrome: stable script: - node build-system/pr-check/local-tests.js - stage: test @@ -87,18 +80,18 @@ jobs: after_script: - build-system/sauce_connect/stop_sauce_connect.sh fast_finish: true - #TODO(ampproject/wg-infra): remove when remote tests stabilize + + # TODO(ampproject/wg-infra): remove when remote tests stabilize allow_failures: - - script: - - node build-system/pr-check/remote-tests.js + - script: + - node build-system/pr-check/remote-tests.js cache: - yarn: true directories: - - build-system/tasks/visual-diff/node_modules - node_modules + - build-system/tasks/visual-diff/node_modules + - sauce_connect - validator/node_modules - validator/nodejs/node_modules - validator/webui/node_modules - - sauce_connect - pip: true - bundler: true + - $HOME/.cache/pip + yarn: true