forked from nextcloud/notes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
69 lines (62 loc) · 1.77 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
language: php
php:
- 5.6
- 7.0
env:
global:
- CORE_BRANCH=master
- APP_NAME=notes
matrix:
- DB=mysql
branches:
only:
- master
- /^stable\d*$/
before_install:
- export DISPLAY=:99.0
- export CHROME_BIN=chromium-browser
- sh -e /etc/init.d/xvfb start
- sudo apt-get update
- sudo apt-get install firefox
- wget https://raw.githubusercontent.com/owncloud/administration/master/travis-ci/before_install.sh
- bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
- cd ../core
- php occ app:enable notes
script:
# Test lint
- cd apps/$APP_NAME
# 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 "{}" \;
# Check app validity
- php ../../occ app:check-code notes
# Run PHP unit tests
- phpunit --coverage-clover clover.xml -c phpunit.xml
- phpunit -c phpunit.integration.xml
# Generate Code Coverage
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover clover.xml
# execute js tests
- cd js
- npm install
- npm install -g gulp
- gulp test
# Create coverage report
- sh -c "if [ '$TRAVIS_PHP_VERSION' != 'hhvm' ]; then wget https://scrutinizer-ci.com/ocular.phar; fi"
- sh -c "if [ '$TRAVIS_PHP_VERSION' != 'hhvm' ]; then php ocular.phar code-coverage:upload --format=php-clover clover.xml; fi"
matrix:
include:
- php: 7.1
env: DB=mysql
- php: 7.0
env: "DB=mysql CORE_BRANCH=stable9.1"
- php: 5.6
env: "DB=sqlite CORE_BRANCH=stable9"
- php: 5.6
env: "DB=pgsql CORE_BRANCH=stable8.2"
- php: 5.6
env: "DB=mysql CORE_BRANCH=stable8.1"
fast_finish: true