53 строки
942 B
YAML
53 строки
942 B
YAML
language: php
|
|
php:
|
|
- 7.3
|
|
- 7.4
|
|
|
|
services:
|
|
- mysql
|
|
- postgresql
|
|
|
|
env:
|
|
global:
|
|
- CORE_BRANCH=stable20
|
|
- APP=files_antivirus
|
|
matrix:
|
|
- DB=sqlite
|
|
|
|
branches:
|
|
only:
|
|
- master
|
|
- /^stable\d+(\.\d+)?$/
|
|
|
|
before_install:
|
|
- wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
|
|
- . ./before_install.sh $APP $CORE_BRANCH $DB
|
|
- cd ../server
|
|
- php occ app:enable $APP
|
|
|
|
before_script:
|
|
- cd apps/$APP
|
|
|
|
script:
|
|
# Test lint
|
|
- find . -name \*.php -not -path './vendor/*' -exec php -l "{}" \;
|
|
|
|
# Run phpunit tests
|
|
- cd tests
|
|
- php avirserver.php &
|
|
- phpunit --configuration phpunit.xml
|
|
|
|
# Create coverage report
|
|
- wget https://scrutinizer-ci.com/ocular.phar
|
|
- php ocular.phar code-coverage:upload --format=php-clover clover.xml
|
|
|
|
matrix:
|
|
include:
|
|
- php: 7.3
|
|
env: DB=mysql
|
|
- php: 7.3
|
|
env: DB=pgsql
|
|
allow_failures:
|
|
- php: hhvm
|
|
fast_finish: true
|