From ec200463e5c46b3028ba4294fbc4973eebd113da Mon Sep 17 00:00:00 2001 From: Zhuohuan LI Date: Mon, 16 May 2016 01:15:51 +0800 Subject: [PATCH] try to fix chrome version inside travis-ci --- .travis.chrome.sh | 14 ++++++++++++++ .travis.yml | 8 ++++++++ 2 files changed, 22 insertions(+) create mode 100755 .travis.chrome.sh diff --git a/.travis.chrome.sh b/.travis.chrome.sh new file mode 100755 index 00000000..af350c48 --- /dev/null +++ b/.travis.chrome.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# Holy shit batman! +# https://github.com/travis-ci/travis-ci/issues/938 +# https://github.com/travis-ci/travis-ci/issues/2555 + +sudo apt-get install -y python-software-properties +sudo apt-add-repository "deb http://dl.google.com/linux/chrome/deb/ stable main" +sudo sed -i s/deb-src.*google.*//g /etc/apt/sources.list +wget -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - +sudo apt-get update -qq +sudo apt-get install -y google-chrome-stable + +sudo chmod 1777 /dev/shm diff --git a/.travis.yml b/.travis.yml index f4885c7d..62414f60 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,13 @@ language: node_js node_js: - "6.1" - "6" +before_install: + - export DISPLAY=:99.0 + - sh -e /etc/init.d/xvfb start + - ./.travis.chrome.sh +cache: + directories: + - node_modules notifications: webhooks: urls: @@ -9,3 +16,4 @@ notifications: on_success: change # options: [always|never|change] default: always on_failure: always # options: [always|never|change] default: always on_start: never # options: [always|never|change] default: always + -- GitLab