-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
48 lines (43 loc) · 1.87 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
language: php
php:
- 7.0
- 7.1
addons:
firefox: latest-nightly
apt:
packages:
- google-chrome-stable
before_install:
# Setup xvfb for Selenium
# Xvfb: X virtual frame buffer is X11 server which does graphical operation in
# memory, hence no output is displayed.
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
before_script:
# Start PhantomJS webdriver
- phantomjs --webdriver=4445 > /dev/null &
# dump the current versions
- google-chrome-stable --version
# Start Chrome headless
- google-chrome-stable --no-sandbox --no-first-run --disable-extensions --disable-gpu --headless --remote-debugging-port=9222 about:blank &>/dev/null &
#- while ! curl http://localhost:9222 &>/dev/null; do sleep 1; done
# Download Chromedrive
- wget http://chromedriver.storage.googleapis.com/2.42/chromedriver_linux64.zip
- unzip -o -q chromedriver_linux64.zip
- wget https://github.com/mozilla/geckodriver/releases/download/v0.23.0/geckodriver-v0.23.0-linux64.tar.gz
- tar zxfv geckodriver-v0.23.0-linux64.tar.gz
- chmod +x geckodriver
# Get and run Selenium/
- wget http://selenium-release.storage.googleapis.com/3.14/selenium-server-standalone-3.14.0.jar
-O selenium-server-standalone.jar
- java -Dwebdriver.chrome.driver=`pwd`/chromedriver
-Dwebdriver.gecko.driver=`pwd`/geckodriver
-jar selenium-server-standalone.jar > /dev/null 2>&1 &
# Run composer install
- composer install
script:
- vendor/bin/behat -c behatGoutte.yml -s web features/web/exemploGoutte.feature
- vendor/bin/behat -c behatChromeHeadless.yml -s web features/web/exemploJavaScript.feature
- vendor/bin/behat -c behatChrome.yml -s web features/web/exemploJavaScript.feature
- vendor/bin/behat -c behatFirefox.yml -s web features/web/exemploJavaScript.feature
- vendor/bin/behat -c behatPhantomJS.yml -s web features/web/exemploJavaScript.feature