2016-10-13 18:09:42 +03:00
|
|
|
pipeline:
|
|
|
|
eslint:
|
|
|
|
image: nextcloudci/eslint:eslint-1
|
|
|
|
commands:
|
|
|
|
- ./run-eslint.sh
|
2016-10-17 12:35:30 +03:00
|
|
|
when:
|
|
|
|
matrix:
|
|
|
|
TESTS: eslint
|
2016-10-13 18:09:42 +03:00
|
|
|
stylelint:
|
|
|
|
image: nextcloudci/stylelint:stylelint-1
|
|
|
|
commands:
|
|
|
|
- ./run-stylelint.sh
|
2016-10-17 12:35:30 +03:00
|
|
|
when:
|
|
|
|
matrix:
|
|
|
|
TESTS: stylelint
|
|
|
|
check-app-compatbility:
|
2018-07-26 13:54:00 +03:00
|
|
|
image: nextcloudci/php7.0:php7.0-19
|
2016-10-17 12:35:30 +03:00
|
|
|
environment:
|
|
|
|
- APP_NAME=spreed
|
2018-09-19 09:37:27 +03:00
|
|
|
- CORE_BRANCH=master
|
2016-10-17 12:35:30 +03:00
|
|
|
- DB=sqlite
|
|
|
|
commands:
|
|
|
|
# Pre-setup steps
|
|
|
|
- wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
|
|
|
|
- bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
|
|
|
|
- cd ../server
|
|
|
|
|
|
|
|
# Code checker
|
2016-10-17 12:38:17 +03:00
|
|
|
- ./occ app:check-code $APP_NAME
|
2016-10-17 12:35:30 +03:00
|
|
|
- cd apps/$APP_NAME/
|
|
|
|
when:
|
|
|
|
matrix:
|
|
|
|
TESTS: check-app-compatbility
|
2016-10-17 12:58:22 +03:00
|
|
|
syntax-php7.0:
|
2018-07-26 13:54:00 +03:00
|
|
|
image: nextcloudci/php7.0:php7.0-19
|
2016-10-17 12:58:22 +03:00
|
|
|
environment:
|
|
|
|
- APP_NAME=spreed
|
2018-09-19 09:37:27 +03:00
|
|
|
- CORE_BRANCH=master
|
2016-10-17 12:58:22 +03:00
|
|
|
- DB=sqlite
|
|
|
|
commands:
|
|
|
|
# Pre-setup steps
|
|
|
|
- wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
|
|
|
|
- bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
|
|
|
|
- cd ../server
|
|
|
|
- composer install
|
2017-07-25 11:35:53 +03:00
|
|
|
- ./lib/composer/bin/parallel-lint apps/$APP_NAME/
|
2016-10-17 12:58:22 +03:00
|
|
|
when:
|
|
|
|
matrix:
|
|
|
|
TESTS: syntax-php7.0
|
|
|
|
signed-off-check:
|
2018-07-26 13:54:00 +03:00
|
|
|
image: nextcloudci/php7.0:php7.0-19
|
2016-10-17 12:58:22 +03:00
|
|
|
environment:
|
|
|
|
- APP_NAME=spreed
|
2018-09-19 09:37:27 +03:00
|
|
|
- CORE_BRANCH=master
|
2016-10-17 12:58:22 +03:00
|
|
|
- DB=sqlite
|
|
|
|
commands:
|
|
|
|
# Pre-setup steps
|
|
|
|
- wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
|
|
|
|
- bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
|
|
|
|
- cd ../server
|
|
|
|
- php ./build/signed-off-checker.php
|
2018-04-12 17:43:59 +03:00
|
|
|
secrets: [ github_token ]
|
2016-10-17 12:58:22 +03:00
|
|
|
when:
|
|
|
|
matrix:
|
|
|
|
TESTS: signed-off-check
|
2018-01-15 16:33:26 +03:00
|
|
|
php7.0:
|
2018-07-26 13:54:00 +03:00
|
|
|
image: nextcloudci/php7.0:php7.0-19
|
2016-10-17 12:58:22 +03:00
|
|
|
environment:
|
|
|
|
- APP_NAME=spreed
|
2018-09-19 09:37:27 +03:00
|
|
|
- CORE_BRANCH=master
|
2016-10-17 12:58:22 +03:00
|
|
|
- DB=sqlite
|
|
|
|
commands:
|
|
|
|
# Pre-setup steps
|
|
|
|
- wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
|
|
|
|
- bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
|
2017-01-13 17:34:54 +03:00
|
|
|
- cd ../server/
|
|
|
|
- ./occ app:enable $APP_NAME
|
|
|
|
- cd apps/$APP_NAME
|
2016-10-17 12:58:22 +03:00
|
|
|
|
|
|
|
# Run phpunit tests
|
|
|
|
- cd tests/php/
|
|
|
|
- phpunit --configuration phpunit.xml
|
|
|
|
when:
|
|
|
|
matrix:
|
2018-01-15 16:33:26 +03:00
|
|
|
TESTS: php7.0
|
|
|
|
php7.1:
|
2018-07-26 13:54:00 +03:00
|
|
|
image: nextcloudci/php7.1:php7.1-16
|
2016-10-17 12:58:22 +03:00
|
|
|
environment:
|
|
|
|
- APP_NAME=spreed
|
2018-09-19 09:37:27 +03:00
|
|
|
- CORE_BRANCH=master
|
2016-10-17 12:58:22 +03:00
|
|
|
- DB=sqlite
|
|
|
|
commands:
|
|
|
|
# Pre-setup steps
|
|
|
|
- wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
|
|
|
|
- bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
|
2017-01-13 17:34:54 +03:00
|
|
|
- cd ../server/
|
|
|
|
- ./occ app:enable $APP_NAME
|
|
|
|
- cd apps/$APP_NAME
|
2016-10-17 12:58:22 +03:00
|
|
|
|
|
|
|
# Run phpunit tests
|
|
|
|
- cd tests/php/
|
|
|
|
- phpunit --configuration phpunit.xml
|
|
|
|
when:
|
|
|
|
matrix:
|
2018-01-15 16:33:26 +03:00
|
|
|
TESTS: php7.1
|
|
|
|
php7.2:
|
2018-07-26 13:54:00 +03:00
|
|
|
image: nextcloudci/php7.2:php7.2-12
|
2016-10-17 12:58:22 +03:00
|
|
|
environment:
|
|
|
|
- APP_NAME=spreed
|
2018-09-19 09:37:27 +03:00
|
|
|
- CORE_BRANCH=master
|
2016-10-17 12:58:22 +03:00
|
|
|
- DB=sqlite
|
|
|
|
commands:
|
|
|
|
# Pre-setup steps
|
|
|
|
- wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
|
|
|
|
- bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
|
2017-01-13 17:34:54 +03:00
|
|
|
- cd ../server/
|
|
|
|
- ./occ app:enable $APP_NAME
|
|
|
|
- cd apps/$APP_NAME
|
2016-10-17 12:58:22 +03:00
|
|
|
|
|
|
|
# Run phpunit tests
|
|
|
|
- cd tests/php/
|
|
|
|
- phpunit --configuration phpunit.xml
|
|
|
|
when:
|
|
|
|
matrix:
|
2018-01-15 16:33:26 +03:00
|
|
|
TESTS: php7.2
|
2017-07-14 17:49:11 +03:00
|
|
|
php7.1-integration:
|
2018-07-26 13:54:00 +03:00
|
|
|
image: nextcloudci/php7.1:php7.1-16
|
2017-07-14 17:49:11 +03:00
|
|
|
environment:
|
|
|
|
- APP_NAME=spreed
|
2018-09-19 09:37:27 +03:00
|
|
|
- CORE_BRANCH=master
|
2017-07-14 17:49:11 +03:00
|
|
|
commands:
|
|
|
|
# Pre-setup steps
|
|
|
|
- wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
|
|
|
|
- bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
|
|
|
|
- cd ../server/
|
|
|
|
- ./occ app:enable $APP_NAME
|
|
|
|
- cd apps/$APP_NAME
|
|
|
|
|
|
|
|
# Run integration tests
|
|
|
|
- cd tests/integration/
|
|
|
|
- bash run.sh
|
|
|
|
when:
|
|
|
|
matrix:
|
|
|
|
TESTS: php7.1-integration
|
2016-10-17 22:42:41 +03:00
|
|
|
jsunit:
|
|
|
|
image: nextcloudci/jsunit:jsunit-5
|
|
|
|
commands:
|
|
|
|
- unset PHANTOMJS_BIN
|
|
|
|
- npm install
|
|
|
|
- node_modules/karma/bin/karma start --single-run
|
|
|
|
when:
|
|
|
|
matrix:
|
|
|
|
TESTS: jsunit
|
2018-04-20 16:48:28 +03:00
|
|
|
acceptance-chat:
|
|
|
|
image: nextcloudci/acceptance-php7.1:acceptance-php7.1-2
|
2018-09-06 11:31:14 +03:00
|
|
|
environment:
|
|
|
|
- APP_NAME=spreed
|
2018-09-19 09:37:27 +03:00
|
|
|
- CORE_BRANCH=master
|
2018-04-20 16:48:28 +03:00
|
|
|
commands:
|
|
|
|
# Pre-setup steps
|
2018-09-06 11:31:14 +03:00
|
|
|
- git clone --depth 1 -b $CORE_BRANCH https://github.com/nextcloud/server ../server
|
|
|
|
- cp -R . ../server/apps/$APP_NAME
|
2018-04-20 16:48:28 +03:00
|
|
|
- cd ../server
|
|
|
|
- git submodule update --init
|
|
|
|
- ln --symbolic `pwd` /var/www/html
|
|
|
|
|
|
|
|
# Run acceptance tests
|
|
|
|
- tests/acceptance/run-local.sh --acceptance-tests-dir apps/spreed/tests/acceptance --timeout-multiplier 10 --nextcloud-server-domain acceptance-chat --selenium-server selenium:4444 allow-git-repository-modifications features/chat.feature
|
|
|
|
when:
|
|
|
|
matrix:
|
|
|
|
TESTS-ACCEPTANCE: chat
|
2018-04-10 21:33:00 +03:00
|
|
|
acceptance-conversation:
|
|
|
|
image: nextcloudci/acceptance-php7.1:acceptance-php7.1-2
|
2018-09-06 11:31:14 +03:00
|
|
|
environment:
|
|
|
|
- APP_NAME=spreed
|
2018-09-19 09:37:27 +03:00
|
|
|
- CORE_BRANCH=master
|
2018-04-10 21:33:00 +03:00
|
|
|
commands:
|
|
|
|
# Pre-setup steps
|
2018-09-06 11:31:14 +03:00
|
|
|
- git clone --depth 1 -b $CORE_BRANCH https://github.com/nextcloud/server ../server
|
|
|
|
- cp -R . ../server/apps/$APP_NAME
|
2018-04-10 21:33:00 +03:00
|
|
|
- cd ../server
|
|
|
|
- git submodule update --init
|
|
|
|
- ln --symbolic `pwd` /var/www/html
|
|
|
|
|
|
|
|
# Run acceptance tests
|
|
|
|
- tests/acceptance/run-local.sh --acceptance-tests-dir apps/spreed/tests/acceptance --timeout-multiplier 10 --nextcloud-server-domain acceptance-conversation --selenium-server selenium:4444 allow-git-repository-modifications features/conversation.feature
|
|
|
|
when:
|
|
|
|
matrix:
|
|
|
|
TESTS-ACCEPTANCE: conversation
|
2016-10-17 12:35:30 +03:00
|
|
|
|
|
|
|
matrix:
|
|
|
|
include:
|
2017-07-17 14:03:28 +03:00
|
|
|
- TESTS: eslint
|
|
|
|
- TESTS: stylelint
|
|
|
|
- TESTS: check-app-compatbility
|
|
|
|
- TESTS: syntax-php7.0
|
|
|
|
- TESTS: signed-off-check
|
|
|
|
- TESTS: php7.0
|
|
|
|
- TESTS: php7.1
|
2018-01-15 16:33:26 +03:00
|
|
|
- TESTS: php7.2
|
2017-07-14 17:49:11 +03:00
|
|
|
- TESTS: php7.1-integration
|
2018-02-12 14:54:21 +03:00
|
|
|
DB: sqlite
|
2018-02-12 14:56:37 +03:00
|
|
|
- TESTS: php7.1-integration
|
|
|
|
DB: mysql
|
|
|
|
DATABASEHOST: mysql-5.7
|
2018-02-12 14:59:58 +03:00
|
|
|
- TESTS: php7.1-integration
|
|
|
|
DB: pgsql
|
|
|
|
DATABASEHOST: postgres-10
|
2017-07-17 14:03:28 +03:00
|
|
|
- TESTS: jsunit
|
2018-04-20 16:48:28 +03:00
|
|
|
- TESTS: acceptance
|
|
|
|
TESTS-ACCEPTANCE: chat
|
2018-04-10 21:33:00 +03:00
|
|
|
- TESTS: acceptance
|
|
|
|
TESTS-ACCEPTANCE: conversation
|
2018-02-12 14:56:37 +03:00
|
|
|
|
|
|
|
services:
|
|
|
|
mysql-5.7:
|
|
|
|
image: mysql:5.7
|
|
|
|
environment:
|
|
|
|
- MYSQL_ROOT_PASSWORD=owncloud
|
|
|
|
- MYSQL_USER=oc_autotest
|
|
|
|
- MYSQL_PASSWORD=owncloud
|
|
|
|
- MYSQL_DATABASE=oc_autotest
|
|
|
|
when:
|
|
|
|
matrix:
|
|
|
|
DATABASEHOST: mysql-5.7
|
2018-02-12 14:59:58 +03:00
|
|
|
postgres-10:
|
|
|
|
image: postgres:10
|
|
|
|
environment:
|
|
|
|
- POSTGRES_USER=oc_autotest
|
Fix integration tests with Docker image for PostgreSQL 10.5
The `postgres:10` tag is not fixed, but updated every time a new
`postgres:10.X` image is released. Thus, the integration tests run in
Drone always use the latest Docker image for PostgreSQL 10.
The parameters used for the Docker container of PostgreSQL relied on a
bug in both the Nextcloud installer and in the Docker image for
PostgreSQL; the bug in the image was fixed in "postgres:10.5", so the
tests started to fail due to not being able to install Nextcloud.
The database user created in the image did not have "create role"
privileges, so that user was the one used by the Nextcloud installer.
After the fix it does, so the Nextcloud installer creates and uses a new
user instead. However, if an existing database name is given to the
installer the installer does not grant privileges to that new user on
the existing database.
By default the container creates a new database with the same name as
the database user ("oc_autotest"), and that database was passed to the
installer. Thus, as the new user was not granted privileges on the
existing database it could not connect to it and the installation failed.
Now the container creates a dummy database with a different name to the
one passed to the installer, so now the "oc_autotest" database is
created by the installer and the new user is made owner of that new
database.
Note that this fix is backwards compatible with PostgreSQL images prior
to the fix, so no special handling is needed in `run-docker.sh` when
older images are used.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-09-21 15:48:11 +03:00
|
|
|
- POSTGRES_DB=oc_autotest_dummy
|
2018-02-12 14:59:58 +03:00
|
|
|
- POSTGRES_PASSWORD=
|
|
|
|
when:
|
|
|
|
matrix:
|
|
|
|
DATABASEHOST: postgres-10
|
2018-04-10 21:33:00 +03:00
|
|
|
selenium:
|
|
|
|
image: selenium/standalone-firefox:2.53.1-beryllium
|
|
|
|
environment:
|
|
|
|
# Reduce default log level for Selenium server (INFO) as it is too
|
|
|
|
# verbose.
|
|
|
|
- JAVA_OPTS=-Dselenium.LOGGER.level=WARNING
|
|
|
|
when:
|
|
|
|
matrix:
|
|
|
|
TESTS: acceptance
|