mirror of https://github.com/nextcloud/contacts
91 lines
3.3 KiB
YAML
91 lines
3.3 KiB
YAML
sudo: false
|
|
dist: trusty
|
|
language: php
|
|
php:
|
|
- 7.0
|
|
- 7.1
|
|
# - 7.2
|
|
env:
|
|
global:
|
|
- CORE_BRANCH=master
|
|
- NIGHTLY=FALSE
|
|
matrix:
|
|
- DB=pgsql
|
|
|
|
branches:
|
|
only:
|
|
- master
|
|
- /^stable\d+(\.\d+)?$/
|
|
- /^v\d++(\.\d+)?+(\.\d+)?+(\.\d+)?$/
|
|
|
|
matrix:
|
|
include:
|
|
- php: 7.0
|
|
env: DB=pgsql CORE_BRANCH=stable12
|
|
- php: 7.1
|
|
env: DB=pgsql CORE_BRANCH=stable12
|
|
- php: 7.0
|
|
env: DB=pgsql CORE_BRANCH=stable13
|
|
- php: 7.1
|
|
env: DB=pgsql CORE_BRANCH=stable13
|
|
# - php: 7.2
|
|
# env: DB=pgsql CORE_BRANCH=stable13
|
|
fast_finish: true
|
|
|
|
before_install:
|
|
- export DISPLAY=:99.0
|
|
- sh -e /etc/init.d/xvfb start
|
|
- nvm install 7.6
|
|
- npm install -g npm@latest
|
|
- make
|
|
- make appstore
|
|
# install nextcloud
|
|
- cd ../
|
|
- git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b $CORE_BRANCH core
|
|
- mv contacts core/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
|
|
# fill nextcloud with default configs and enable contacts
|
|
- cd core
|
|
- 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 contacts
|
|
- ./occ background:cron # enable default cron
|
|
- php -S localhost:8080 &
|
|
- cd apps/contacts
|
|
|
|
script:
|
|
- make test
|
|
|
|
# Upload the nightly to ftp server
|
|
- if [[ "$NIGHTLY" = "TRUE" ]]; then curl --ftp-create-dirs -T /home/travis/build/nextcloud/core/apps/contacts/build/artifacts/appstore/contacts.tar.gz -u $FTP_LOGIN:$FTP_PW ftp://upload.portknox.de/htdocs/contacts/nextcloud_contacts_nightly_build_$(date +%Y-%m-%d).tar.gz; fi
|
|
|
|
after_failure:
|
|
- cat ../../data/nextcloud.log
|
|
|
|
after_success:
|
|
# codecov has issues when not run exactly in the cloned folder on travis, so
|
|
# revert everything
|
|
- cd ../../../
|
|
- mv core/apps/contacts .
|
|
- cd contacts
|
|
- node_modules/codecov/bin/codecov
|
|
|
|
deploy:
|
|
provider: releases
|
|
api_key:
|
|
secure: IBNQc4MsBqOc6bj2fD1PnMFfELFpP2GqpZjmBsqP43dWixo8vZzafg7JwlsfnuC0rfcOE/2NwHQl43d+37sXMbMl+ZXgz2ax/wOyLAS2PK/EQEDkzYOdI0E/8u2D7V7m9LlCQ8MOGSGmjYwFcDLzcmgU8AOWg4N85ktpOkaiVF1287Rr+wcRZ0o4/VTVvykYzfKDIBaACAX+EaXtpBtD0cTr1lFN4vKuUma2+iX+MyPVZcvIbCWv2bTzqXzfkT3NagZuFXcooXhvPGFoOb8AisxRSoVP48Vpt8ziG+7wDFlIrNe+fjNJxOEMDEP8cYljoUU6MaOxcm012s/CqHjWBuTI5MRAWlH4w9YJ/1BhFoSJOUb21401zp255puPZJ+Vq8i720F21xm7g7Vc/1NsEAwmTzLgaG8cnV98SonITVDuR4qIaMWpHwTMhap6sHMW7UfH4QnCKypo1mgITFdjM9ANYbcfF8GBfrK4MZtuw75AcLoytFia+KnAOO7OpC93eo6Czcqu6ILOBz1XNWZcFQJTrkLKkFslZLhSSrgPrTL4Py0zVmBurxdOmoZkDcxyKmk/1ggQmZKhh7OS1TGW/7tckscwMhukLwnQiXBCQJ7VWAJ/2eaolym1+fDbqJ4z8t9q2KEfZyqlYAL4VxPqQzxwO9O19ej1WtncvpFHlQw=
|
|
file: build/artifacts/appstore/contacts.tar.gz
|
|
skip_cleanup: true
|
|
on:
|
|
repo: nextcloud/contacts
|
|
tags: true
|
|
php: 7.0
|
|
|
|
addons:
|
|
firefox: "latest"
|