summaryrefslogtreecommitdiffstats
path: root/.travis.yml
blob: e1db4b006dcc67f24bec172faa97c97c4a71a06a (plain)
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
language: php
php:
  - 5.4
  - 5.5
  - 5.6
  - 7
  - hhvm

env:
  global:
    - BRANCH=master
  matrix:
    - DB=mysql

branches:
  only:
    - master
    - /^stable\d*$/

matrix:
  allow_failures:
    - php: hhvm

install:
  # install ocdev
  - sudo add-apt-repository -y ppa:chris-lea/node.js
  - sudo apt-get update
  - sudo apt-get -y install nodejs python3-jinja2 python3-setuptools
  - sudo easy_install3 requests
  - sudo easy_install3 ocdev
  # 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' IDENTIFIED BY '';"
  - mysql -u root -e "grant all on oc_autotest.* to 'oc_autotest'@'localhost';"
  # install owncloud
  - cd ..
  - ocdev setup core --dir owncloud --branch $BRANCH --no-history
  - mv contactsrework owncloud/apps
  - phpenv config-add owncloud/apps/contactsrework/tests/travis/php.ini
  - cd owncloud
  - ./occ maintenance:install --database-name oc_autotest --database-user oc_autotest --database-pass --admin-user admin --admin-pass admin --database $DB
  - ./occ app:enable contactsrework
  - cd apps/contactsrework
  - npm install --deps

script:
  - phpunit -c phpunit.xml
  - phpunit -c phpunit.integration.xml
  - node_modules/gulp/bin/gulp.js