diff options
author | Morris Jobke <morris.jobke@gmail.com> | 2014-06-06 09:29:01 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2014-08-05 16:53:27 +0200 |
commit | 472d896ce9aad4d526126a7aefa96127920585e6 (patch) | |
tree | 2d2ba785bfbf43f4de2db732593622322ed4229a /.travis.yml | |
parent | 892d82480430b3c8d8e47feaa4f903922deec27e (diff) | |
download | nextcloud-server-472d896ce9aad4d526126a7aefa96127920585e6.tar.gz nextcloud-server-472d896ce9aad4d526126a7aefa96127920585e6.zip |
Travis support
* use PHPUnit 4.x
* force php memory limit on travis to 1024MB
* create script for travis
* whitelist branches master, stable5 and stable6 on travis (and PRs)
* sqlplus64
* conditional JS tests and ocular temporal removal
* enable scrutinizer code coverage
* move oracle to top to decrease overall test duration
Diffstat (limited to '.travis.yml')
-rw-r--r-- | .travis.yml | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000000..02876ee59d2 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,58 @@ +language: php +php: + - 5.3 + - 5.4 + - 5.5 + - 5.6 + - hhvm + +matrix: + include: + - php: 5.4 + env: DB=oracle + - php: 5.4 + env: DB=pgsql + - php: 5.4 + env: DB=mysql + allow_failures: + - php: hhvm + fast_finish: true + +env: + matrix: + - DB=sqlite + +before_script: + # setup databases + - wget https://raw.githubusercontent.com/owncloud/administration/master/travis-ci/setup_databases.sh + - bash ./setup_databases.sh $DB + + # Additional PHP config + - if [[ $HHVM == false ]] ; then phpenv config-add build/travis.php.ini ; fi + + # fetch Ocular (for test coverage upload) + - wget https://scrutinizer-ci.com/ocular.phar + + # call setup for tests + - build/prepareTests.sh $DB + +script: + - phpunit --version + # Run PHP lint for each PHP version + - if [[ $DB == 'sqlite' ]] ; then ant -f build/build.xml -Dbasedir=. prepare lint ; fi + + # Run tests + - phpunit --configuration tests/phpunit-autotest.xml --coverage-clover tests/autotest-clover-$DB.xml --verbose --debug + + # Run JS tests just once (see test matrix - mysql is just run once) + - if [[ $DB == 'mysql' ]] ; then ./autotest-js.sh ; fi + + # Upload coverage report + - php ocular.phar code-coverage:upload --format=php-clover tests/autotest-clover-$DB.xml + +branches: + only: + - master + - stable5 + - stable6 + - stable7 |