62 строки
1.5 KiB
YAML
62 строки
1.5 KiB
YAML
sudo: true
|
|
language: php
|
|
php:
|
|
- 7.1
|
|
- 7.2
|
|
- 7.3
|
|
env:
|
|
global:
|
|
- "CORE_BRANCH=master"
|
|
- "APP_NAME=richdocuments"
|
|
matrix:
|
|
- "DB=mysql TEST=lint"
|
|
- "DB=mysql TEST=checker"
|
|
- "DB=mysql TEST=phpunit"
|
|
|
|
matrix:
|
|
include:
|
|
- php: 7.0
|
|
env: "DB=sqlite CORE_BRANCH=stable15"
|
|
- php: 7.0
|
|
env: "DB=sqlite CORE_BRANCH=stable15 TEST=lint"
|
|
- php: 7.2
|
|
env: "DB=sqlite"
|
|
- php: 7.2
|
|
env: "DB=pgsql"
|
|
allow_failures:
|
|
- env: "DB=mysql TEST=checker"
|
|
fast_finish: true
|
|
|
|
branches:
|
|
only:
|
|
- master
|
|
- /^stable\d+(\.\d+)?$/
|
|
|
|
before_install:
|
|
- wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
|
|
- . ./before_install.sh $APP_NAME $CORE_BRANCH $DB
|
|
|
|
# Add some output debugging information
|
|
- cd ../server
|
|
- ./occ check
|
|
- ./occ status
|
|
- ./occ app:list
|
|
|
|
script:
|
|
- cd apps/$APP_NAME/
|
|
|
|
# Test the app
|
|
- if [ "$TEST" == 'lint' ]; then find . -name \*.php -exec php -l "{}" \;; fi
|
|
- if [ "$TEST" == 'lint' ]; then ../../occ app:check-code $APP_NAME -c deprecation; fi
|
|
- if [ "$TEST" == 'checker' ]; then ../../occ app:check-code $APP_NAME -c private -c strong-comparison; fi
|
|
|
|
# Run phpunit tests
|
|
- cd tests/
|
|
- if [ "$TEST" == 'phpunit' ]; then phpunit --configuration phpunit.xml; fi
|
|
|
|
after_script:
|
|
# Create coverage report
|
|
- if [ "$TEST" == 'phpunit' ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
|
|
- if [ "$TEST" == 'phpunit' ]; then php ocular.phar code-coverage:upload --format=php-clover clover.xml; fi
|
|
- cd ../
|