forked from nextcloud/contacts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
85 lines (75 loc) · 3.11 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
sudo: false
dist: trusty
language: php
php:
- 5.6
- 7
env:
global:
- CORE_BRANCH=master
- NIGHTLY=FALSE
matrix:
- DB=pgsql
branches:
only:
- master
- /^stable\d+(\.\d+)?$/
- /^v\d++(\.\d+)?+(\.\d+)?+(\.\d+)?$/
matrix:
allow_failures:
- env: DB=pgsql CORE_BRANCH=master
include:
- php: 5.6
env: DB=pgsql CORE_BRANCH=master
- php: 7
env: DB=pgsql CORE_BRANCH=stable11
fast_finish: true
before_install:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- nvm install 5.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
addons:
firefox: "latest"