forked from viltgroup/minium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
69 lines (65 loc) · 2.52 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
language: java
jdk:
- openjdk6
- oraclejdk7
env:
global:
- PHANTOM_VERSION=1.9.7
- CHROME_DRIVER_VERSION=2.9
- DISPLAY=:99.0
matrix:
- BROWSER=phantomjs
- BROWSER=chrome
matrix:
allow_failures:
- env: BROWSER=phantomjs
before_install:
# Install ia32-libs
# From https://github.com/JakeWharton/ActionBarSherlock/blob/dev/.travis.yml
- sudo apt-get update -qq
- if [ `uname -m` = x86_64 ]; then sudo apt-get install -qq --force-yes libgd2-xpm ia32-libs ia32-libs-multiarch; fi
# Install PhantomJS 1.9.7
- if [ "$BROWSER" = "phantomjs" ]; then
wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-${PHANTOM_VERSION}-linux-x86_64.tar.bz2;
tar -xf phantomjs-${PHANTOM_VERSION}-linux-x86_64.tar.bz2;
sudo rm -rf /usr/local/phantomjs;
sudo mv phantomjs-${PHANTOM_VERSION}-linux-x86_64 /usr/local/phantomjs;
fi
# Install Latest Chrome and Chrome Driver 2.9
- if [ "$BROWSER" = "chrome" ]; then
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1366x768x24;
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb;
sudo dpkg -i google-chrome-stable_current_amd64.deb;
sudo apt-get -f install;
wget http://chromedriver.storage.googleapis.com/${CHROME_DRIVER_VERSION}/chromedriver_linux64.zip;
unzip chromedriver_linux64.zip;
sudo mv chromedriver /usr/local/bin;
fi
before_script:
- if [ "$BROWSER" = "phantomjs" ]; then
phantomjs --version;
phantomjs --webdriver=9515 >&- 1>&- &
fi
- if [ "$BROWSER" = "chrome" ]; then
sudo chmod 1777 /dev/shm;
if [ -f /opt/google/chrome/chrome-sandbox ]; then
export CHROME_SANDBOX=/opt/google/chrome/chrome-sandbox;
else
export CHROME_SANDBOX=$(ls /opt/google/chrome*/chrome-sandbox);
fi;
sudo rm -f $CHROME_SANDBOX;
sudo wget https://googledrive.com/host/0B5VlNZ_Rvdw6NTJoZDBSVy1ZdkE -O $CHROME_SANDBOX;
sudo chown root:root $CHROME_SANDBOX; sudo chmod 4755 $CHROME_SANDBOX;
sudo md5sum $CHROME_SANDBOX;
google-chrome --version;
chromedriver &
fi
install: mvn install -DskipTests=true -Pexe-generation -q -B
script:
# We only run integration tests with Google Chrome
- if [ "$BROWSER" = "phantomjs" ]; then
mvn verify -Dminium.remote.url=http://localhost:9515;
fi
- if [ "$BROWSER" = "chrome" ]; then
mvn verify -Pintegration-test -Dminium.remote.url=http://localhost:9515;
fi