-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
61 lines (48 loc) · 1.59 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
dist: bionic
language: php
php:
- 7.2
- 7.3
- 7.4
services:
- mysql
env:
global:
- BRANCH=stable20
matrix:
- DB=mysql
matrix:
include:
- php: 7.2
- php: 7.3
- php: 7.4
- php: 7.2
env: DB=mysql BRANCH=stable19
- php: 7.3
env: DB=mysql BRANCH=stable19
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 nextcloud
- mv cloud_user_hiorg nextcloud/apps/user_hiorg
before_script:
# Set up core
- php -f nextcloud/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 nextcloud/occ app:enable user_hiorg
# Enable app twice to check occ errors of registered commands
- php -f nextcloud/occ app:enable user_hiorg
- cd nextcloud/apps/user_hiorg
script:
- php -f ../../occ app:check-code user_hiorg
- composer install
- ./vendor/bin/phpunit -c phpunit.xml --coverage-clover=unit-coverage.xml
- ./vendor/bin/php-cs-fixer fix --dry-run --using-cache=no
- cat ../../data/nextcloud.log
after_success:
- bash <(curl -s https://codecov.io/bash)