Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/password_policy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-09-08 17:21:22 +0300
committerGitHub <noreply@github.com>2016-09-08 17:21:22 +0300
commitdba33feb3dca39c565c2dae464b762151034bd7f (patch)
tree442fea778c8aadfdb93b03f764db1321585ff0f1
parent31e67ef87c6b4b445c85991bea8eed29f73d3ead (diff)
parent54f2c541fafa39a3cd506679868e944aa5ac2b9d (diff)
Better testing
-rw-r--r--.travis.yml42
1 files changed, 29 insertions, 13 deletions
diff --git a/.travis.yml b/.travis.yml
index 6c671b4..ddcd5f4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,5 +1,4 @@
language: php
-
php:
- 5.4
- 5.5
@@ -9,37 +8,54 @@ php:
env:
global:
- CORE_BRANCH=stable10
+ - APP_NAME=password_policy
matrix:
- DB=sqlite
-
+
branches:
only:
- master
- /^stable\d+(\.\d+)?$/
-sudo: true
before_install:
- wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
- - bash ./before_install.sh password_policy $CORE_BRANCH $DB
+ - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
-script:
- # Test lint
+ # Add some output debugging information
- cd ../server
- - cd apps/password_policy
- - find . -name \*.php -exec php -l "{}" \;
+ - ./occ check
+ - ./occ status
+ - ./occ app:list
+
+script:
+ - cd apps/$APP_NAME/
+
+ # Test the app
+ - sh -c "if [ '$CODECHECK' = '1' ]; then find . -name \*.php -exec php -l \"{}\" \;; fi"
+ - cd ../../
+ - sh -c "if [ '$CODECHECK' = '1' ]; then ./occ app:check-code $APP_NAME -c private -c strong-comparison; fi"
+ - sh -c "if [ '$CODECHECK' = '2' ]; then ./occ app:check-code $APP_NAME -c deprecation; fi"
+ - cd apps/$APP_NAME/
# Run phpunit tests
- - cd tests
- - phpunit --configuration phpunit.xml
+ - cd tests/
+ - sh -c "if [ '$CODECHECK' != '1' -a '$CODECHECK' != '2' ]; then phpunit --configuration phpunit.xml; fi"
# Create coverage report
- - wget https://scrutinizer-ci.com/ocular.phar
- - php ocular.phar code-coverage:upload --format=php-clover clover.xml
-
+ - sh -c "if [ '$CODECHECK' != '1' -a '$CODECHECK' != '2' ]; then wget https://scrutinizer-ci.com/ocular.phar; fi"
+ - sh -c "if [ '$CODECHECK' != '1' -a '$CODECHECK' != '2' ]; then php ocular.phar code-coverage:upload --format=php-clover clover.xml; fi"
+ - cd ../
+
matrix:
include:
- php: 5.4
env: DB=mysql
- php: 5.4
env: DB=pgsql
+ - php: 5.4
+ env: DB=mysql;CODECHECK=1
+ - php: 5.4
+ env: DB=mysql;CODECHECK=2
+ allow_failures:
+ - env: DB=mysql;CODECHECK=2
fast_finish: true