Use another approach to install chrome

This commit is contained in:
Alexey Andreev 2017-04-22 14:14:50 +03:00
parent 058566e731
commit c8617bacea

View File

@ -15,11 +15,12 @@ branches:
before_install:
- nvm install 7
- CHROMIUM_BUILD=466537
- mkdir -p $HOME/.chromium_dist/
- CHROMIUM_ZIP=$HOME/.chromium_dist/chromium-$CHROMIUM_BUILD.zip
- if [ ! -f $CHROMIUM_ZIP ]; then wget https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2F$CHROMIUM_BUILD%2Fchrome-linux.zip?alt=media -O $CHROMIUM_ZIP; fi
- unzip -q $CHROMIUM_ZIP
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -O .chromium_dist
- export DISPLAY=:99.0
- sudo dpkg -i google-chrome*.deb
- export CHROME_BIN=/usr/bin/google-chrome
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- OLD_VERSION=`mvn help:evaluate -Dexpression=project.version 2>/dev/null | grep -Ev "(^\[|Download\w+:)"`
- NEW_VERSION=${OLD_VERSION%-SNAPSHOT}-dev-`printf %d $TRAVIS_BUILD_NUMBER`
- echo "Building version $NEW_VERSION"
@ -34,15 +35,15 @@ install:
- popd
script:
- mvn -e test #-P \!htmlUnit
- mvn -e test -P \!htmlUnit
- BASE_PATH=`pwd`
#- pushd tests/src/test/js
#- $BASE_PATH/chrome-linux/chrome --headless --remote-debugging-port=9222 --disable-gpu about:blank &
#- CHROME_PID=$!
#- node start.js $BASE_PATH/tests/target/js-tests
#- node start.js $BASE_PATH/html4j/target/js-tests
#- kill $CHROME_PID
#- popd
- pushd tests/src/test/js
- $CHROME_BIN --remote-debugging-port=9222 --disable-gpu about:blank &
- CHROME_PID=$!
- node start.js $BASE_PATH/tests/target/js-tests
- node start.js $BASE_PATH/html4j/target/js-tests
- kill $CHROME_PID
- popd
after_success: >
if [[ "${TRAVIS_PULL_REQUEST:-unknown}" == "false" && $TRAVIS_BRANCH == dev-* ]] ; then