forked from nextcloud/polls
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
60 lines (50 loc) · 1.46 KB
/
.travis.yml
File metadata and controls
60 lines (50 loc) · 1.46 KB
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
sudo: false
dist: trusty
language: php
services:
- mysql
- postgresql
php:
- 5.6
- 7.0
- 7.1
addons:
apt:
packages:
- libxml2-utils
env:
global:
- APP_NAME=polls
matrix:
- DB=mysql;CLOUD=nextcloud;CORE_BRANCH=stable12
- DB=sqlite;CLOUD=nextcloud;CORE_BRANCH=stable12
- DB=pgsql;CLOUD=nextcloud;CORE_BRANCH=stable12
- DB=mysql;CLOUD=owncloud;CORE_BRANCH=stable10
cache:
directories:
- $HOME/.composer/cache
before_install:
# Install NC / oC and app
- if [ $CLOUD = 'nextcloud' ]; then wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh; fi
- if [ $CLOUD = 'owncloud' ]; then wget https://raw.githubusercontent.com/owncloud/administration/master/travis-ci/before_install.sh; fi
- bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
- if [ $CLOUD = 'nextcloud' ]; then cd ../server; fi
- if [ $CLOUD = 'owncloud' ]; then cd ../core; fi
- ./occ app:enable $APP_NAME
before_script:
- cd apps/$APP_NAME
script:
# 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 -exec php -l "{}" \;
# Execute tests
- make test
after_success:
# Generate Code Coverage
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover clover.xml
after_failure:
- cat ../../data/${CLOUD}.log