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:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2016-10-20 20:29:17 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2016-10-20 20:29:17 +0300
commit060f91c20340364f5160f52648a0e7214569a535 (patch)
tree9a22e0df35678b693e887769bd7355ce73678d30 /.travis.yml
parent809329373a1b8b7780abc8fcc62ab49e80044438 (diff)
update travis config
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml113
1 files changed, 72 insertions, 41 deletions
diff --git a/.travis.yml b/.travis.yml
index 7b96f31..91be9cd 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,52 +2,83 @@ sudo: required
dist: trusty
language: php
php:
- - 5.6
- - 7
+ - 5.6
+ - 7.0
+
+addons:
+ apt:
+ packages:
+ - mysql-server-5.6
+ - mysql-client-core-5.6
+ - mysql-client-5.6
+ - libxml2-utils
+
+services:
+ - docker
+ - postgresql
+
env:
- global:
- - CORE_BRANCH=stable9
- matrix:
- - DB=pgsql
+ global:
+ - CORE_BRANCH=master
+ matrix:
+ - DB=sqlite
-matrix:
- allow_failures:
- - env: DB=pgsql CORE_BRANCH=master
- include:
- - php: 5.6
- env: DB=sqlite
- - php: 5.6
- env: DB=mysql
- - php: 5.6
- env: DB=pgsql CORE_BRANCH=master
- fast_finish: true
+branches:
+ only:
+ - master
+ - "/^stable\\d+(\\.\\d+)?$/"
+ - /^v\d++(\.\d+)?+(\.\d+)?+(\.\d+)?$/
+
+cache:
+ directories:
+ - "$HOME/.composer/cache/files"
+ - "$HOME/.npm"
+ - "$HOME/.cache/bower"
before_install:
- # install firefox and enable a display for running JavaScript tests
- - export DISPLAY=:99.0
- - sh -e /etc/init.d/xvfb start
- - sudo apt-get update
- - sudo apt-get -y install python3-setuptools firefox mariadb-server
- - sudo easy_install3 requests ocdev
- - nvm install 5.9
- - npm install -g npm@latest
- - make
- # install core
- - cd ../
- - ocdev setup core --dir owncloud --branch $CORE_BRANCH --no-history
- - mv twofactorsms owncloud/apps/
+ - php --info
+
+ # XDebug is only needed if we report coverage -> speeds up other builds
+ - phpenv config-rm xdebug.ini
+
+ # Set up DB
+ - if [[ "$DB" == 'pgsql' ]]; then createuser -U travis -s oc_autotest; fi
+ - if [[ "$DB" == 'mysql' ]]; then mysql -u root -e 'create database oc_autotest;'; fi
+ - if [[ "$DB" == 'mysql' ]]; then mysql -u root -e "CREATE USER 'oc_autotest'@'localhost' IDENTIFIED BY '';"; fi
+ - if [[ "$DB" == 'mysql' ]]; then mysql -u root -e "GRANT ALL ON oc_autotest.* TO 'oc_autotest'@'localhost';"; fi
+
+ - composer self-update
+ - composer install
+ - cd ..
+ - git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b $CORE_BRANCH core
+ - mv twofactor_sms core/apps/
before_script:
- - createuser -U travis -s oc_autotest
- - mysql -u root -e 'create database oc_autotest;'
- - mysql -u root -e "CREATE USER 'oc_autotest'@'localhost' IDENTIFIED BY '';"
- - mysql -u root -e "grant all on oc_autotest.* to 'oc_autotest'@'localhost';"
- - cd owncloud
- - mkdir data
- - ./occ maintenance:install --database-name oc_autotest --database-user oc_autotest --admin-user admin --admin-pass admin --database $DB --database-pass=''
- - ./occ app:enable twofactorsms
- - ocdev server &
- - cd apps/twofactorsms
+
+ # 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=''
+
+ # Set up app
+ - php -f core/occ app:enable twofactor_sms
+ # Enable app twice to check occ errors of registered commands
+ - php -f core/occ app:enable twofactor_sms
+ - cd core/apps/twoafactor_sms
script:
- - make test \ No newline at end of file
+ # Check info.xml schema validity
+ - wget https://apps.nextcloud.com/schema/apps/info.xsd
+ - xmllint appinfo/info.xml --schema info.xsd --noout
+ - rm info.xsd
+
+ # 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_sms
+
+ # Run PHP tests
+ - cd tests
+ - phpunit --configuration phpunit.xml
+
+matrix:
+ fast_finish: true