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

github.com/nextcloud/twofactor_gateway.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Seyfarth <niklas@seyfarth.de>2021-06-03 16:03:26 +0300
committerNiklas Seyfarth <niklas@seyfarth.de>2021-06-06 16:30:31 +0300
commite9c04cb3b1a4a71059a57a644ff28cefeb0f4464 (patch)
treed85074e3bf35f463d112c040852dc78df2acc698 /.travis.yml
parent27eb87c24ecefceab815516d7f4cfb3103c9fbbf (diff)
Update travis config.
- use normal PHP 7.4 instead of snapshot version - run occ app:check-code only if it is still available in the used NC version - shorten job configuration by properly defining the job matrix - fix warnings about missing and deprecated config keys - reformat file to only use one style (indented lists) - enabled zip PHP extension to not fail because of dependency installation in some jobs Signed-off-by: Niklas Seyfarth <niklas@seyfarth.de>
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml74
1 files changed, 26 insertions, 48 deletions
diff --git a/.travis.yml b/.travis.yml
index 4033e11..a8ff16e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,35 +1,38 @@
-sudo: required
+os: linux
+dist: xenial
language: php
php:
- - 7.2
- - 7.3
- - 7.4snapshot
- 8.0
+ - 7.4
+ - 7.3
env:
global:
- - SERVER_BRANCH=master
- - PHP_COVERAGE=FALSE
- - PATCH_VERSION_CHECK=FALSE
- matrix:
- - DB=sqlite
+ - DB=sqlite
+ - PHP_COVERAGE=FALSE
+ - PATCH_VERSION_CHECK=FALSE
+ - OCC_CHECK_CODE=FALSE
+ jobs:
+ - "SERVER_BRANCH=master PHP_COVERAGE=TRUE"
+ - "SERVER_BRANCH=stable21 OCC_CHECK_CODE=TRUE"
branches:
only:
- - master
- - "/^stable\\d+(\\.\\d+)?$/"
- - /^v\d++(\.\d+)?+(\.\d+)?+(\.\d+)?$/
+ - master
+ - "/^stable\\d+(\\.\\d+)?$/"
+ - /^v\d++(\.\d+)?+(\.\d+)?+(\.\d+)?$/
cache:
directories:
- - "$HOME/.composer/cache/files"
- - "$HOME/.npm"
- - "$HOME/.cache/bower"
+ - "$HOME/.composer/cache/files"
+ - "$HOME/.npm"
+ - "$HOME/.cache/bower"
before_install:
# XDebug is only needed if we report coverage -> speeds up other builds (7.3 has no xdebug yet)
- if [[ "$PHP_COVERAGE" = "FALSE" ]]; then phpenv config-rm xdebug.ini || true; fi
+ - if ! php -m | grep '^zip$' >/dev/null; then echo "extension=zip" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi
- composer self-update
- composer install
- cd ..
@@ -40,7 +43,7 @@ before_install:
before_script:
# Set up core
- - php -f core/occ maintenance:install --database-name oc_autotest --database-user oc_autotest --admin-user admin --admin-pass admin --database $DB --database-pass=''
+ - php -f core/occ maintenance:install --database-name oc_autotest --database-user oc_autotest --admin-user admin --admin-pass admin --database "$DB" --database-pass=''
# Set up app
- php -f core/occ app:enable twofactor_gateway
@@ -51,8 +54,8 @@ script:
# Check PHP syntax errors
- find . -name \*.php -not -path './vendor/*' -exec php -l "{}" \;
- # Run server's app code checker
- - php ../../occ app:check-code twofactor_gateway
+ # Run server's app code checker (will be removed in NC 23)
+ - if [[ "$OCC_CHECK_CODE" = "TRUE" ]]; then php ../../occ app:check-code twofactor_gateway; fi
# Run PHP tests
- composer run test:unit:dev
@@ -62,40 +65,15 @@ after_script:
- if [[ "$PHP_COVERAGE" = "TRUE" ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [[ "$PHP_COVERAGE" = "TRUE" ]]; then php ocular.phar code-coverage:upload --format=php-clover tests/clover.xml; fi
-matrix:
+jobs:
include:
- # NC20 w/ PHP 7.2
+ # NC20 with PHP 7.2
- php: 7.2
dist: trusty
- env: "DB=sqlite SERVER_BRANCH=stable20"
- # NC21 w/ PHP 7.3
- - php: 7.3
- dist: trusty
- env: "DB=sqlite SERVER_BRANCH=stable21"
- # NC21 w/ PHP 7.4
- - php: 7.4
- dist: trusty
- env: "DB=sqlite SERVER_BRANCH=stable21"
- # NC21 w/ PHP 8.0
- - php: 8.0
- dist: xenial
- env: "DB=sqlite SERVER_BRANCH=stable21"
- # NC22 w/ PHP 7.3
- - php: 7.3
- dist: trusty
- env: "DB=sqlite PHP_COVERAGE=TRUE"
- # NC22 w/ PHP 7.4
- - php: 7.4
- dist: trusty
- env: "DB=sqlite PHP_COVERAGE=TRUE"
- # NC22 w/ PHP 8.0
- - php: 8.0
- dist: xenial
- env: "DB=sqlite PHP_COVERAGE=TRUE"
- # NC22 w/ PHP nightly
+ env: "SERVER_BRANCH=stable20 OCC_CHECK_CODE=TRUE"
+ # NC22 with PHP nightly
- php: nightly
- dist: xenial
- env: "PATCH_VERSION_CHECK=TRUE"
+ env: "SERVER_BRANCH=master PATCH_VERSION_CHECK=TRUE"
fast_finish: true
allow_failures:
- php: nightly