Skip to content

Commit 702a5e4

Browse files
filipesilvahansl
authored andcommitted
ci: install chrome on linux
Currently CI is failing because chrome-driver 2.2.9 does not suppport the default chrome present in Travis' linux Trusty images. This PR makes Travis install Chrome proper.
1 parent 5c4c5b4 commit 702a5e4

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.travis.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,17 @@ matrix:
4545
env: NODE_SCRIPT=tests/run_e2e.js
4646

4747
before_install:
48+
# Use a virtual display.
4849
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export DISPLAY=:99.0; fi
4950
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sh -e /etc/init.d/xvfb start; fi
50-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CHROME_BIN=chromium-browser; fi
51-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo "--no-sandbox" > ~/.config/chromium-flags.conf; fi
51+
# Install latest chrome.
52+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CHROME_BIN=/usr/bin/google-chrome; fi
53+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update; fi
54+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y libappindicator1 fonts-liberation; fi
55+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb; fi
56+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo dpkg -i google-chrome*.deb; fi
57+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo "--no-sandbox" > ~/.config/chrome-flags.conf; fi
58+
# Install yarn.
5259
- curl -o- -L https://yarnpkg.com/install.sh | bash
5360
- export PATH="$HOME/.yarn/bin:$PATH"
5461
- yarn config set spin false

0 commit comments

Comments
 (0)