-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
76 lines (75 loc) · 3.04 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
70
71
72
73
74
75
76
language: node_js
os: linux
sudo: required
dist: trusty
group: deprecated-2017Q4
node_js:
- "7"
env:
global:
secure: dn0FPQ5IG4M/3kdwnyI78ElQ308Vc3QnKAvkWfwMFb8QxDqxQdnTo7AV1qTMtbLrDNkeEWIgi4nc7jmXNtvGTwOfhAULVh6606Qs5B+ezTdwzajbbFMI8SKQx/pnTojOMu8dx7V4lMoR/YWcojR0VC1IWVC62TGbSB1k5BDGgH0=
before_install:
- sudo apt-get install -y xserver-xorg-dev libxext-dev libxi-dev
install:
- git clone https://github.com/openworm/geppetto-application.git
- npm install --silent -g phantomjs
- npm install --silent -g casperjs
- npm install --silent -g slimerjs
- npm install --silent -g gl
- npm config set registry http://registry.npmjs.org/
services:
- docker
addons:
firefox: "58.0"
apt:
packages:
- mesa-utils
- xvfb
- libgl1-mesa-dri
- libglapi-mesa
- libosmesa6
- net-tools
- lsof
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- export SLIMERJSLAUNCHER=/home/travis/firefox-58.0/firefox/firefox
- export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/
- sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
script:
- firefox -v
- slimerjs -v
- phantomjs -v
- docker --version
- casperjs --version
- cd geppetto-application/tests/casperjs
- travis_retry docker build -t="geppetto_persistence" --build-arg targetBranch=$TRAVIS_BRANCH --build-arg originBranch=$TRAVIS_PULL_REQUEST_BRANCH --build-arg defaultBranch=development --build-arg aKey=$accessKey --build-arg sKey=$secretKey https://github.com/openworm/org.geppetto.git#issue-travis:utilities/docker/geppetto-persistence/
- travis_retry docker run -d --name geppetto_persistence_container -p 28081:8080 geppetto_persistence;
- bash utilities/test_geppetto_server.sh
- sleep 60
- docker ps -a
- http_status=$(curl -s -I $1 http://localhost:28081/org.geppetto.frontend | grep HTTP/1.1 | awk {'print $2'})
- echo "$http_status";
- while [ "$http_status" == "404" ]; do
echo "Restart run";
docker stop $(docker ps -a -q);
docker rm $(docker ps -a -q);
travis_retry docker run -t -dit --name=geppetto_persistence_container -p localhost:28081:8080 geppetto_persistence;
bash utilities/test_geppetto_server.sh;
sleep 100;
http_status=$(curl -s -I $1 http://localhost:28081 | grep HTTP/1.1 | awk {'print $2'});
echo "Done restarting";
echo "$http_status";
sudo docker cp geppetto_persistence_container:/home/developer/virgo/serviceability/logs/log.log /etc;
tail -n 200 /etc/log.log;
done
- sleep 30
- http_status=$(curl -s -I $1 http://localhost:8080 | grep HTTP/1.1 | awk {'print $2'})
- echo "$http_status"
- travis_retry xvfb-run -a --server-args="-screen 0 1024x768x24" casperjs test --includes=PersistenceTestsLogic.js PersistenceTests.js --host=http://localhost:28081/ --engine=slimerjs
- sudo docker cp geppetto_persistence_container:/home/developer/virgo/serviceability /etc/logs
- tail -n 200 /etc/logs/logs/log.log
- sudo docker logs -t geppetto_persistence_container
- docker ps -a;
- docker stop $(docker ps -a -q)
- docker rm $(docker ps -a -q)