-
Notifications
You must be signed in to change notification settings - Fork 25
/
.travis.yml
65 lines (59 loc) · 2.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
language: python
python:
- 3.2
- 3.3
- 3.4
- 3.5
matrix:
allow_failures:
- env: OWNCLOUD=9.0 BRANCH=master
include:
- python: 3.2
env: OWNCLOUD=8 BRANCH=stable8
- python: 3.2
env: OWNCLOUD=8.1 BRANCH=stable8.1
- python: 3.2
env: OWNCLOUD=8.1 BRANCH=stable8.2
env:
matrix:
- OWNCLOUD=9 BRANCH=stable9
before_install:
- sudo add-apt-repository ppa:ondrej/php5-oldstable -y
- sudo apt-get update
install:
# use older jinja version if on python 3.2 to prevent breakage
- if [[ $TRAVIS_PYTHON_VERSION == '3.2' ]]; then pip install jinja2==2.6; fi
# install the lib
- pip install setuptools
- python setup.py install
# install phpunit and php
- sudo apt-get update
- sudo apt-get install php5 php5-gd php5-curl php5-mysql php5-sqlite php5-pgsql
# set up postgresql
- createuser -U travis -s oc_autotest
# set up mysql
- mysql -e 'create database oc_autotest;'
- mysql -u root -e "CREATE USER 'oc_autotest'@'localhost';"
- mysql -u root -e "grant all on oc_autotest.* to 'oc_autotest'@'localhost';"
# set up php
- echo 'default_charset = "UTF-8"' | sudo tee --append /etc/php5/cli/php.ini
- wget https://phar.phpunit.de/phpunit-old.phar
- chmod +x phpunit-old.phar
- sudo mv phpunit-old.phar /usr/local/bin/phpunit
before_script:
# setup owncloud
- cd ../
- ocdev setup core --branch $BRANCH --no-history
- cd core/apps
- ocdev startapp --email test --author test --owncloud $OWNCLOUD MyApp
- cd ../
- mkdir data
- if (( $(echo "$OWNCLOUD >= 8.1" |bc -l) )); then ./occ maintenance:install --database-name oc_autotest --database-user oc_autotest --admin-user admin --admin-pass admin --database sqlite; fi
- if (( $(echo "$OWNCLOUD >= 8.1" |bc -l) )); then ./occ app:enable myapp; fi
- cd apps/myapp
- if (( $(echo "$OWNCLOUD >= 9" |bc -l) )); then make; fi
script:
- if (( $(echo "$OWNCLOUD >= 9" |bc -l) )); then phpunit -c phpunit.xml; else phpunit tests; fi
- if (( $(echo "$OWNCLOUD >= 8.1" |bc -l) )); then phpunit -c phpunit.integration.xml; fi
- cd ../../../ocdev
- python3 setup.py test