From 0190eb5ac94f1e1ef42787acd0f5b9927b320827 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Wed, 7 Nov 2018 16:54:32 +0100 Subject: Clean up travis structure Signed-off-by: Christoph Wurst --- .travis.yml | 42 ++++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/.travis.yml b/.travis.yml index 807ba0ed..7e6dbe50 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,41 +1,34 @@ sudo: true language: php php: - - 5.6 - 7 - 7.1 - 7.2 env: global: - - CORE_BRANCH=master - - APP_NAME=richdocuments + - "CORE_BRANCH=master" + - "APP_NAME=richdocuments" matrix: - - DB=mysql;CODECHECK=1 - - DB=mysql;CODECHECK=2 - - DB=mysql;CODECHECK=3 + - "DB=mysql TEST=lint" + - "DB=mysql TEST=checker" + - "DB=mysql TEST=phpunit" matrix: - exclude: - - php: 5.6 # Not compatible - env: DB=mysql;CODECHECK=1 - - php: 5.6 # Not compatible - env: DB=mysql;CODECHECK=3 include: - php: 5.6 - env: DB=sqlite;CORE_BRANCH=stable12 + env: "DB=sqlite CORE_BRANCH=stable13 TEST=lint" - php: 7.0 - env: DB=sqlite;CORE_BRANCH=stable13 + env: "DB=sqlite CORE_BRANCH=stable13" - php: 7.2 - env: DB=mysql + env: "DB=sqlite CORE_BRANCH=stable14" - php: 7.2 - env: DB=pgsql + env: "DB=sqlite" - php: 7.2 - env: DB=mysql;JSTESTS=1 + env: "DB=pgsql" allow_failures: - - env: DB=mysql;CODECHECK=2 + - env: "DB=mysql TEST=checker" fast_finish: true - branches: only: - master @@ -55,15 +48,16 @@ script: - cd apps/$APP_NAME/ # Test the app - - sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' = '1' ]; then find . -name \*.php -exec php -l \"{}\" \;; fi" - - sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' = '1' ]; then ../../occ app:check-code $APP_NAME -c deprecation; fi" - - sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' = '2' ]; then ../../occ app:check-code $APP_NAME -c private -c strong-comparison; fi" + - 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/ - - sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' != '1' -a '$CODECHECK' != '3' ]; then phpunit --configuration phpunit.xml; fi" + - if [ "$TEST" == 'phpunit' ]; then phpunit --configuration phpunit.xml; fi +after_script: # 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" + - 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 ../ -- cgit v1.2.3