Commit 092e793b authored by Asscheman's avatar Asscheman
Browse files

Test do not work anymore on the new Travis CI platform.

Pear is not supported on the new Travis platform, composer is used 
instead. Addons is used for getting Firefox. Changed phpunit call.
parent a19f38ef
language: php
php:
# - 5.3.3
# aliased to 5.3.29
# - 5.3
# aliased to a recent 5.4.x version
# - 5.4
- 5.4
# aliased to a recent 5.5.x version
- 5.5
# aliased to a recent 5.6.xversion
# - 5.6
- 5.6
# aliased to a recent 7.x version
# - 7.0
# - hhvm
# - nightly
- 7.0
addons:
firefox: "40.0"
sudo: required
......@@ -27,17 +25,27 @@ before_script:
- ./tests/travis/setup/setup_selenium_server.sh
script:
- phpunit ./tests/phpunit_selenium/adminTest.php
- phpunit ./tests/phpunit_selenium/authorizationTest.php
- phpunit ./tests/phpunit_selenium/collaboratorTest.php
- phpunit ./tests/phpunit_selenium/importTest.php
- phpunit ./tests/phpunit_selenium/managerTest.php
- phpunit ./tests/phpunit_selenium/submitterTest.php
- phpunit ./tests/phpunit_selenium/tempTest.php
# Use phpunit or vendor/bin/phpunit to start tests.
# vendor/bin/phpunit is the best option to run the tests. Because this one
# is installed via composer.
# Not running phpunit installed via composer gives errors, has to do with the
# versions of the dependencies.
# - vendor/bin/phpunit ./tests/phpunit_selenium/adminTest.php
# - vendor/bin/phpunit ./tests/phpunit_selenium/authorizationTest.php
# - vendor/bin/phpunit ./tests/phpunit_selenium/collaboratorTest.php
# - vendor/bin/phpunit ./tests/phpunit_selenium/importTest.php
# - vendor/bin/phpunit ./tests/phpunit_selenium/managerTest.php
# - vendor/bin/phpunit ./tests/phpunit_selenium/submitterTest.php
# - vendor/bin/phpunit ./tests/phpunit_selenium/tempTest.php
## Run all tests
## - phpunit ./tests/phpunit_selenium/
- vendor/bin/phpunit ./tests/phpunit_selenium/
notifications:
notifications:
email:
- d.asscheman@lumc.nl
\ No newline at end of file
recipients:
- d.asscheman@lumc.nl
on_success: never
## [always|never|change] # default: change
on_failure: always
## [always|never|change] # default: always
\ No newline at end of file
echo "Install and setup apache"
sudo apt-get -qq update > /dev/null
sudo apt-get -qq install -y --force-yes apache2 libapache2-mod-php5 php5-curl php5-intl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-mysql
## exim4
## smtp
sudo a2enmod rewrite
for i in "$@"
......
serverUrl='http://127.0.0.1:4444'
serverFile=selenium-server-standalone-2.44.0.jar
firefoxUrl=http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/37.0.2/linux-x86_64/en-US/firefox-37.0.2.tar.bz2
firefoxFile=firefox.tar.bz2
phpVersion=`php -v`
sudo apt-get -qq update
serverFile=selenium-server-standalone-2.50.1.jar
##echo "Updating Composer"
##sudo /home/travis/.phpenv/versions/5.3/bin/composer self-update
phpVersion=`php -v`
echo "Installing dependencies"
composer install
echo "Download Firefox"
wget $firefoxUrl -O $firefoxFile
tar xvjf $firefoxFile
echo "check firefox version"
firefox --version
echo "Download Selenium"
if [ ! -f $serverFile ]; then
......@@ -27,7 +19,21 @@ if [ ! -e ${serverFile} ]; then
fi
echo "Starting xvfb and Selenium"
export DISPLAY=:99.0
## You can start the selenium in two ways. The second method prints all selenium
## server logs in travis. This might give long logs errors. Therefore the first
## method is preferred. The second one might be convenient when debugging.
# 1:
sudo xvfb-run java -jar $serverFile > /tmp/selenium.log &
# 2:
#sh -e /etc/init.d/xvfb start
#sleep 3
#sudo java -jar $serverFile -port 4444 > /tmp/selenium.log &
sleep 3
wget --retry-connrefused --tries=120 --waitretry=3 --output-file=/dev/null $serverUrl/wd/hub/status -O /dev/null
if [ ! $? -eq 0 ]; then
echo "Selenium Server not started --> EXIT!"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment