forked from nextcloud/polls
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
57 lines (47 loc) · 1.05 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
sudo: false
dist: trusty
language: php
services:
- mysql
- postgresql
php:
- 7.2
- 7.3
addons:
apt:
packages:
- libxml2-utils
env:
global:
- CORE_BRANCH=stable14
- APP_NAME=polls
matrix:
- DB=mysql
- DB=pgsql
- DB=sqlite
cache:
directories:
- $HOME/.composer/cache
before_install:
# Install NC and app
- wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh;
- bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
- cd ../server;
- ./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/nextcloud.log