Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/gallery.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Paroz <github@oparoz.com>2015-08-11 03:34:03 +0300
committerOlivier Paroz <github@oparoz.com>2015-08-11 03:34:03 +0300
commitb84508a0b687b91b623c6f81ea99e5fe40daa846 (patch)
treefdc2ffb7294a715d6f0a20d35fc135030d905aa6 /.travis.yml
parenta8b1af48860f359435fa451fa9c765c420b3dd33 (diff)
1st acceptance and api tests
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml30
1 files changed, 25 insertions, 5 deletions
diff --git a/.travis.yml b/.travis.yml
index 3d5fab9a..4d9efa22 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -19,16 +19,34 @@ branches:
- /^stable\d+(\.\d+)?$/
before_install:
+ # Setup Selenium
+ - export DISPLAY=:99.0
+ - sh -e /etc/init.d/xvfb start
+ - sleep 3
+ - wget https://selenium-release.storage.googleapis.com/2.47/selenium-server-standalone-2.47.0.jar
+ - java -jar selenium-server-standalone-2.47.0.jar -port 4444 >/dev/null 2>&1 & # WARNING - Takes a long time to start up. Keep here
+
+ # Download the latest PhantomJS
+ - mkdir travis-phantomjs
+ - wget https://s3.amazonaws.com/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 -O $PWD/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2
+ - tar -xvf $PWD/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 -C $PWD/travis-phantomjs
+ - export PATH=$PWD/travis-phantomjs:$PATH
+ # Ghostdriver does not work on Travis# - phantomjs --webdriver=4444 --ignore-ssl-errors=true --webdriver-loglevel=DEBUG &
+
+ # Getting dependencies
- composer self-update
- composer install -o
+
+ # Installing ownCloud
- wget https://raw.githubusercontent.com/owncloud/administration/master/travis-ci/before_install.sh
- bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
- cd ../core
- php occ app:enable $APP_NAME
before_script:
- - php -S localhost:8000 &
- - phantomjs --webdriver=4444 &
+ # Make sure Webdriver is running
+ - curl http://localhost:4444/wd/hub/status
+ - phantomjs --version
script:
# Test lint
@@ -36,10 +54,12 @@ script:
- sh -c "if [ '$TRAVIS_PHP_VERSION' != '5.4' ]; then find . -name \*.php -print0 | xargs -0 -n 1 -P 4 php -l; fi"
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.4' ]; then find . -name \*.php -exec php -l "{}" \;; fi"
- # Run tests
- - sh -c "if [ '$TRAVIS_PHP_VERSION' != 'hhvm' ] && [ '$TRAVIS_PHP_VERSION' != '7' ]; then php vendor/bin/codecept run unit,integration --coverage --coverage-xml; fi;"
+ # Run unit, integration and API tests, with code coverage
+ - sh -c "if [ '$TRAVIS_PHP_VERSION' != 'hhvm' ] && [ '$TRAVIS_PHP_VERSION' != '7' ]; then php vendor/bin/codecept run unit,integration,api --coverage --coverage-xml; fi;"
+ # Acceptance tests, using Firefox, without code coverage
+ - sh -c "if [ '$TRAVIS_PHP_VERSION' != 'hhvm' ] && [ '$TRAVIS_PHP_VERSION' != '7' ]; then php vendor/bin/codecept run acceptance --env firefox; fi;"
- # Create coverage report
+ # Send coverage report to Scrutinizer
- sh -c "if [ '$TRAVIS_PHP_VERSION' != 'hhvm' ] && [ '$TRAVIS_PHP_VERSION' != '7' ]; then wget https://scrutinizer-ci.com/ocular.phar; fi"
- sh -c "if [ '$TRAVIS_PHP_VERSION' != 'hhvm' ] && [ '$TRAVIS_PHP_VERSION' != '7' ]; then php ocular.phar code-coverage:upload --format=php-clover tests/_output/coverage.xml; fi"