diff options
author | Matthias Held <ilovemilk@wusa.io> | 2018-07-19 19:54:27 +0300 |
---|---|---|
committer | Matthias Held <ilovemilk@wusa.io> | 2018-07-19 19:54:27 +0300 |
commit | de8b3a66ab925a0526d963c42b002e04c61c59fc (patch) | |
tree | f16cfab736a48080e2e8b27d0cf4fb1b396aaabc /.travis.yml | |
parent | 3886a37b2527f056cac0117e25f3737bb24b9013 (diff) |
New travis.yml
Diffstat (limited to '.travis.yml')
-rw-r--r-- | .travis.yml | 100 |
1 files changed, 48 insertions, 52 deletions
diff --git a/.travis.yml b/.travis.yml index 03f0d97..ed6b2ad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,62 +1,58 @@ -sudo: required -dist: trusty language: php -branches: - only: - - master - - /^feature.*$/ php: - - 5.6 - - 7 + - 5.6 + - 7.0 + - 7.1 + env: - global: - - CORE_BRANCH=stable13 - matrix: - - DB=pgsql + global: + - CORE_BRANCH=master + - APP_NAME=ransomware_detecion + 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+)?$/ + - /^feature.*$/ before_install: - # enable a display for running JavaScript tests - - export DISPLAY=:99.0 - - sh -e /etc/init.d/xvfb start - - if [[ "$DB" == 'mysql' ]]; then sudo apt-get -y install mariadb-server; fi - - nvm install 6 - - npm install -g npm@latest - - make - - make appstore - # install core - - cd ../ - - git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b $CORE_BRANCH nextcloud - - mv ransomware_detection nextcloud/apps/ - -before_script: - - 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 - - cd nextcloud - - 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 ransomware_detection - - php -S localhost:8080 & - - cd apps/ransomware_detection + - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh + - . ./before_install.sh $APP_NAME $CORE_BRANCH $DB + + # Add some output debugging information + - cd ../server + - ./occ check + - ./occ status + - ./occ app:list + - ./occ app:enable $APP_NAME + - ./occ app:list script: - - make test + - cd apps/$APP_NAME/ -after_failure: - - cat ../../data/nextcloud.log + # 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/ -addons: - firefox: "latest" + # Run phpunit tests + - cd tests/ + - sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' != '1' -a '$CODECHECK' != '2' ]; then phpunit --configuration phpunit.xml; fi" + +matrix: + include: + - php: 7.0 + env: DB=mysql + - php: 7.0 + env: DB=pgsql + - php: 7.0 + env: DB=mysql;CODECHECK=1 + - php: 7.0 + env: DB=mysql;CODECHECK=2 + allow_failures: + - env: DB=mysql;CODECHECK=2 + fast_finish: true
\ No newline at end of file |