2017-08-23 14:51:37 +03:00
|
|
|
sudo: required
|
2019-04-01 02:10:18 +03:00
|
|
|
dist: cosmic
|
2014-08-10 23:33:43 +04:00
|
|
|
language: php
|
|
|
|
php:
|
2019-04-01 05:56:28 +03:00
|
|
|
- 7.2
|
2014-08-31 20:23:51 +04:00
|
|
|
env:
|
2017-08-23 14:51:37 +03:00
|
|
|
global:
|
2019-05-06 17:42:57 +03:00
|
|
|
- CORE_BRANCH=stable16
|
2017-08-23 14:51:37 +03:00
|
|
|
matrix:
|
|
|
|
- DB=pgsql
|
2014-08-31 20:23:51 +04:00
|
|
|
|
2017-08-23 14:51:37 +03:00
|
|
|
matrix:
|
|
|
|
allow_failures:
|
|
|
|
- env: DB=pgsql CORE_BRANCH=master
|
|
|
|
include:
|
2019-04-01 05:56:28 +03:00
|
|
|
- php: 7.2
|
2017-08-23 14:51:37 +03:00
|
|
|
env: DB=sqlite
|
2019-04-01 05:56:28 +03:00
|
|
|
- php: 7.2
|
2017-08-23 14:51:37 +03:00
|
|
|
env: DB=mysql
|
2019-04-18 03:06:09 +03:00
|
|
|
- php: 7.2
|
|
|
|
env: DB=pgsql
|
|
|
|
services: postgresql
|
2019-06-11 17:14:27 +03:00
|
|
|
- php: 7.2
|
|
|
|
env: DB=pgsql CORE_BRANCH=master
|
|
|
|
services: postgresql
|
2017-08-23 14:51:37 +03:00
|
|
|
fast_finish: true
|
2014-08-31 20:23:51 +04:00
|
|
|
|
2014-08-10 23:33:43 +04:00
|
|
|
before_install:
|
2019-04-01 03:39:09 +03:00
|
|
|
## enable a display for running JavaScript tests
|
|
|
|
#- export DISPLAY=:99.0
|
|
|
|
#- sh -e /etc/init.d/xvfb start
|
2017-08-23 14:51:37 +03:00
|
|
|
- if [[ "$DB" == 'mysql' ]]; then sudo apt-get -y install mariadb-server; fi
|
2019-04-04 15:32:40 +03:00
|
|
|
#- if [[ "$DB" == 'pgsql' ]]; then sudo apt-get -y install postgresql; fi
|
2019-04-01 05:06:20 +03:00
|
|
|
- if [[ "$DB" == 'sqlite' ]]; then sudo apt-get -y install sqlite3; fi
|
2017-08-23 14:51:37 +03:00
|
|
|
- nvm install 6
|
|
|
|
- npm install -g npm@latest
|
|
|
|
- make
|
2019-04-01 05:06:20 +03:00
|
|
|
#- make appstore
|
2017-08-23 14:51:37 +03:00
|
|
|
# install core
|
|
|
|
- cd ../
|
2019-06-11 17:14:27 +03:00
|
|
|
- git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b $CORE_BRANCH nextcloud
|
|
|
|
# - wget -q https://download.nextcloud.com/server/releases/nextcloud-16.0.1.zip ; unzip -q nextcloud-16.0.1.zip ; rm nextcloud-16.0.1.zip
|
2017-08-23 14:51:37 +03:00
|
|
|
- mv maps nextcloud/apps/
|
2014-08-10 23:33:43 +04:00
|
|
|
|
2017-08-23 14:51:37 +03:00
|
|
|
before_script:
|
2019-04-04 15:32:40 +03:00
|
|
|
- if [[ "$DB" == 'pgsql' ]]; then sudo createuser -U postgres -s oc_autotest; fi
|
|
|
|
- if [[ "$DB" == 'mysql' ]]; then sudo mysql -u root -e 'create database oc_autotest;'; fi
|
|
|
|
- if [[ "$DB" == 'mysql' ]]; then sudo mysql -u root -e "CREATE USER 'oc_autotest'@'localhost' IDENTIFIED BY '';"; fi
|
|
|
|
- if [[ "$DB" == 'mysql' ]]; then sudo mysql -u root -e "grant all on oc_autotest.* to 'oc_autotest'@'localhost';"; fi
|
2017-08-23 14:51:37 +03:00
|
|
|
- cd nextcloud
|
2019-05-06 17:42:57 +03:00
|
|
|
# temporary fix, feel free to fix that
|
|
|
|
- sed -i $'s|if (substr($fullPath, 0, strlen($root) + 1) === $root . \'/\')|if (is_string($root) and substr($fullPath, 0, strlen($root) + 1) === $root . \'/\')|g' lib/autoloader.php
|
2017-08-23 14:51:37 +03:00
|
|
|
- mkdir data
|
2019-05-06 17:42:57 +03:00
|
|
|
- php ./occ maintenance:install --database-name oc_autotest --database-user oc_autotest --admin-user admin --admin-pass admin --database $DB --database-pass=''
|
|
|
|
- php ./occ app:enable maps
|
2019-06-11 17:14:27 +03:00
|
|
|
- chmod 777 data
|
2019-04-04 15:32:40 +03:00
|
|
|
#- php -S localhost:8080 &
|
2017-08-23 14:51:37 +03:00
|
|
|
- cd apps/maps
|
2014-08-31 20:23:51 +04:00
|
|
|
|
2017-08-23 14:51:37 +03:00
|
|
|
script:
|
|
|
|
- make test
|
2014-08-31 20:23:51 +04:00
|
|
|
|
2017-08-23 14:51:37 +03:00
|
|
|
after_failure:
|
|
|
|
- cat ../../data/nextcloud.log
|
2014-08-31 20:23:51 +04:00
|
|
|
|
2019-04-04 15:32:40 +03:00
|
|
|
#addons:
|
|
|
|
# firefox: "latest"
|