-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
45 lines (37 loc) · 1.31 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
language: php
php:
- 7.4
- 7.3
- 8.0
env:
- DB=sqlite BRANCH=stable21
- DB=mysql BRANCH=stable21
before_install:
# install core
- cd ../
- git clone https://github.com/nextcloud/core.git --recursive --depth 1 -b $BRANCH nextcloud
- mv b2sharebridge nextcloud/apps/
install:
- pear install pear/PHP_CodeSniffer
- phpenv rehash
- phpenv config-add nextcloud/apps/b2sharebridge/tests/travis/php.ini
services:
- mysql
before_script:
- 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
# fill nextcloud with default configs and enable news
- cd nextcloud
- mkdir data
- ./occ maintenance:install --database-name oc_autotest --database-user oc_autotest --admin-user admin --admin-pass admin --database $DB --database-pass=''
- ./occ app:enable b2sharebridge
script:
# nextcloud check-code
- ./occ app:check-code b2sharebridge
# php unit/lint checking
- cd apps/b2sharebridge
- phpcs --extensions=php --ignore=*/tests/*,*/templates/* .
- cd tests
- phpunit -c phpunit.xml
- phpunit -c phpunit.integration.xml