-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.travis.yml
68 lines (58 loc) · 1.95 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
language: php
os:
- linux
php:
- "5.4"
before_install:
# shutdown servies on Travis, which may have a memory impact
# show memory usage before and after shutdown of services
- sudo service --status-all
- sudo free -m -t
- sudo /etc/init.d/mysql stop
- sudo /etc/init.d/postgresql stop
- sudo /etc/init.d/couchdb stop
- sudo /etc/init.d/redis-server stop
- sudo free -m -t
before_script:
#- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
#- sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
#- sudo apt-get update
#- sudo apt-get install google-chrome-stable
#- composer self-update
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 6 # give xvfb some time to start
- composer install
script:
#- google-chrome --version
- firefox --version
- php selenium-setup register secondInstance 4445
- php selenium-setup start
- php selenium-setup start secondInstance
- sleep 10 # give the instances time to start
- cat selenium-servers.lock
- export no_proxy="localhost,127.0.0.*"
- wget -v http://localhost:4444/wd/hub/
# - wget -v http://localhost:4445/wd/hub/
# run check
- mkdir tests; cd tests
- wget https://raw.githubusercontent.com/bogdananton/Selenium-Setup-VM/master/tests/composer.json
- wget https://raw.githubusercontent.com/bogdananton/Selenium-Setup-VM/master/tests/test.php
- composer update
# run tests on (default) 4444 port
- phpunit test.php
# run tests on second instance 4445 port
- sed -i -- 's/4444/4445/g' test.php
- phpunit test.php
- cd ..
after_script:
- cat build/logs/selenium.log
- php selenium-setup servers
notifications:
email: false
irc:
channels:
- "asimov.freenode.net#mobiledetect"
template:
- "%{repository} (%{commit}): %{message}. Build details: %{build_url}"
- "%{author} said %{commit_subject}. See %{compare_url}"