зеркало из https://github.com/nextcloud/activity.git
72 строки
2.0 KiB
YAML
72 строки
2.0 KiB
YAML
language: php
|
|
php:
|
|
- 5.4
|
|
- 5.5
|
|
- 5.6
|
|
- 7
|
|
|
|
env:
|
|
global:
|
|
- CORE_BRANCH=master
|
|
- APP_NAME=activity
|
|
matrix:
|
|
- DB=sqlite
|
|
|
|
branches:
|
|
only:
|
|
- master
|
|
- /^stable\d+(\.\d+)?$/
|
|
|
|
before_install:
|
|
- wget https://raw.githubusercontent.com/owncloud/administration/master/travis-ci/before_install.sh
|
|
- bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
|
|
|
|
# Add some output debugging information
|
|
- cd ../core
|
|
- ./occ check
|
|
- ./occ status
|
|
- ./occ app:list
|
|
|
|
script:
|
|
- 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 ../
|
|
|
|
# Run Javascript unit tests
|
|
- cd tests/js
|
|
- sh -c "if [ '$JSTESTS' = '1' ]; then npm install --deps; node_modules/karma/bin/karma start karma.config.js --single-run; fi"
|
|
- cd ../
|
|
|
|
matrix:
|
|
include:
|
|
- php: 5.4
|
|
env: DB=mysql
|
|
- php: 5.4
|
|
env: DB=pgsql
|
|
- php: 5.4
|
|
env: DB=oracle
|
|
- php: 5.4
|
|
env: DB=mysql;CODECHECK=1
|
|
- php: 5.4
|
|
env: DB=mysql;CODECHECK=2
|
|
- php: 5.4
|
|
env: DB=mysql;JSTESTS=1
|
|
allow_failures:
|
|
- env: DB=mysql;CODECHECK=2
|
|
- env: DB=oracle # TODO: temporary until it is fixed
|
|
fast_finish: true
|