This repository has been archived by the owner on Dec 18, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
55 lines (42 loc) · 1.42 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
sudo: false
language: php
php:
- 5.6
- 7
services:
- mysql
- postgresql
env:
- DB=sqlite BRANCH=master
- DB=mysql BRANCH=master
cache:
directories:
- "$HOME/.cache/bower"
before_install:
- php --info
# Set up DB
- 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
- cd ..
- git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b $BRANCH server
- mv sketch server/apps/
install:
# Set up core
- php -f server/occ maintenance:install --database-name oc_autotest --database-user oc_autotest --admin-user admin --admin-pass admin --database $DB --database-pass=''
# Set up app
- php -f server/occ app:enable sketch
- cd server/apps/sketch
# Install bower & deps
- npm install -g bower
- bower install
script:
# Check PHP syntax errors
- find . -name \*.php -not -path './vendor/*' -exec php -l "{}" \;
# Run PHP tests
- phpunit -c phpunit.xml
- phpunit -c phpunit.integration.xml
# Send coverage report
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover clover.xml