-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.travis.yml
More file actions
75 lines (74 loc) · 2.76 KB
/
.travis.yml
File metadata and controls
75 lines (74 loc) · 2.76 KB
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
language: python
os: linux
sudo: false
dist: trusty
bundler_args: --retry 5
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 --quiet https://github.com/MetaCell/geppetto-hnn.git
- cd geppetto-hnn
- if [ `git branch -a | egrep "remotes/origin/${TRAVIS_BRANCH}"` ]; then git checkout $TRAVIS_BRANCH ; else echo "Branch $TRAVIS_BRANCH does not exist for the dependent bundle, checking out development ..." && git checkout development; fi
- cd ..
- npm install --silent -g phantomjs
- npm install --silent -g casperjs
- npm install --silent -g slimerjs
- npm install --silent -g gl
python:
- "2.7"
- "3.5"
edge: true
notifications:
slack: metacell:5ALSeoP88DqIhORUJvxE56sq
services:
- docker
addons:
firefox: "58.0"
apt:
packages:
- mesa-utils
- xvfb
- libgl1-mesa-dri
- libglapi-mesa
- libosmesa6
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/
script:
- travis_wait travis_retry docker build -t="hnn-ui" --build-arg hnnuiBranch=$TRAVIS_BRANCH -f="./Dockerfile_dev" .
- travis_retry docker run -t -dit --name=hnn-ui_container -h localhost -p 8888:8888 hnn-ui:latest
- cd $TRAVIS_BUILD_DIR/ && ls
- cd geppetto-hnn && ls
- cd tests
- bash utilities/hnn-server-status.sh
- sleep 30
- http_status=$(curl -s -I $1 http://localhost:8888/geppetto | grep HTTP/1.1 | awk {'print $2'})
- echo "$http_status"
- while [ "$http_status" == "404" ]; do
echo "Restart run";
echo "Printing logs for debugging purposes";
docker stop $(docker ps -a -q);
docker rm $(docker ps -a -q);
docker run -t -dit --name=hnn-ui_container -h localhost -p 8888:8888 hnn-ui:latest
bash utilities/hnn-server-status.sh
sleep 30;
http_status=$(curl -s -I $1 http://localhost:8888/geppetto | grep HTTP/1.1 | awk {'print $2'})
echo "Done restarting";
echo "$http_status";
done;
- http_status=$(curl -s -I $1 http://localhost:28081 | grep HTTP/1.1 | awk {'print $2'})
- echo "$http_status";
- "curl -s -I $1 http://localhost:8888/geppetto | grep HTTP/1.1 | awk {'print $2'}"
- firefox --version
- travis_retry xvfb-run -a --server-args="-screen 0 1024x768x24" casperjs test hnn-tests.js --host=http://localhost:8888/ --engine=slimerjs
- python -c "import fcntl; fcntl.fcntl(1, fcntl.F_SETFL, 0)"
- docker logs -t hnn-ui_container
- docker stop $(docker ps -a -q)
- docker rm $(docker ps -a -q)