|
|
|
@ -9,7 +9,7 @@ env:
|
|
|
|
|
- CORE_BRANCH=master
|
|
|
|
|
matrix:
|
|
|
|
|
- DB=sqlite
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
branches:
|
|
|
|
|
only:
|
|
|
|
|
- master
|
|
|
|
@ -17,26 +17,48 @@ branches:
|
|
|
|
|
|
|
|
|
|
sudo: true
|
|
|
|
|
before_install:
|
|
|
|
|
- wget https://raw.githubusercontent.com/owncloud/administration/master/travis-ci/before_install.sh
|
|
|
|
|
- bash ./before_install.sh richdocuments $CORE_BRANCH $DB
|
|
|
|
|
- wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
|
|
|
|
|
- bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
|
|
|
|
|
|
|
|
|
|
# Add some output debugging information
|
|
|
|
|
- cd ../server
|
|
|
|
|
- ./occ check
|
|
|
|
|
- ./occ status
|
|
|
|
|
- ./occ app:list
|
|
|
|
|
|
|
|
|
|
script:
|
|
|
|
|
# Test lint
|
|
|
|
|
- cd ../core/apps/richdocuments
|
|
|
|
|
- find . -name \*.php -exec php -l "{}" \;
|
|
|
|
|
|
|
|
|
|
# Run phpunit tests
|
|
|
|
|
- cd tests
|
|
|
|
|
- phpunit --configuration phpunit.xml
|
|
|
|
|
|
|
|
|
|
# Create coverage report
|
|
|
|
|
- sh -c "if [ '$TRAVIS_PHP_VERSION' != 'hhvm' ]; then wget https://scrutinizer-ci.com/ocular.phar; fi"
|
|
|
|
|
- sh -c "if [ '$TRAVIS_PHP_VERSION' != 'hhvm' ]; then php ocular.phar code-coverage:upload --format=php-clover clover.xml; fi"
|
|
|
|
|
|
|
|
|
|
- cd apps/$APP_NAME/
|
|
|
|
|
|
|
|
|
|
# Test the app
|
|
|
|
|
- sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' = '1' ]; then find . -name \*.php -exec php -l \"{}\" \;; fi"
|
|
|
|
|
- cd ../../
|
|
|
|
|
- sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' = '1' ]; then ./occ app:check-code $APP_NAME -c private -c strong-comparison; fi"
|
|
|
|
|
- sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' = '2' ]; then ./occ app:check-code $APP_NAME -c deprecation; fi"
|
|
|
|
|
- cd apps/$APP_NAME/
|
|
|
|
|
|
|
|
|
|
# Run phpunit tests
|
|
|
|
|
- cd tests/
|
|
|
|
|
- sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' != '1' -a '$CODECHECK' != '2' ]; then phpunit --configuration phpunit.xml; fi"
|
|
|
|
|
|
|
|
|
|
# Create coverage report
|
|
|
|
|
- sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' != '1' -a '$CODECHECK' != '2' ]; then wget https://scrutinizer-ci.com/ocular.phar; fi"
|
|
|
|
|
- sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' != '1' -a '$CODECHECK' != '2' ]; then php ocular.phar code-coverage:upload --format=php-clover clover.xml; fi"
|
|
|
|
|
- cd ../
|
|
|
|
|
|
|
|
|
|
matrix:
|
|
|
|
|
|
|
|
|
|
matrix:
|
|
|
|
|
include:
|
|
|
|
|
- php: 5.6
|
|
|
|
|
env: DB=mysql
|
|
|
|
|
- php: 5.6
|
|
|
|
|
env: DB=pgsql
|
|
|
|
|
- php: 5.6
|
|
|
|
|
env: DB=mysql;CODECHECK=1
|
|
|
|
|
- php: 5.6
|
|
|
|
|
env: DB=mysql;CODECHECK=2
|
|
|
|
|
- php: 5.6
|
|
|
|
|
env: DB=mysql;JSTESTS=1
|
|
|
|
|
allow_failures:
|
|
|
|
|
- env: DB=mysql;CODECHECK=2
|
|
|
|
|
fast_finish: true
|
|
|
|
|