From 0a39d9d0a4f416130e5e52620b3701c7f55b8b7b Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 5 Dec 2018 10:46:02 +0100 Subject: [PATCH] Split up running of the integration tests so they don't timeout Signed-off-by: Joas Schilling --- .drone.yml | 79 +++++++++++++------ .../add-participant.feature | 0 .../{ => conversation}/delete-room.feature | 0 .../{ => conversation}/one-to-one.feature | 0 .../promotion-demotion.feature | 0 .../{ => conversation}/public-private.feature | 0 .../remove-participant.feature | 0 .../{ => conversation}/remove-self.feature | 0 .../{ => conversation}/rename-room.feature | 0 .../{ => conversation}/set-password.feature | 0 10 files changed, 54 insertions(+), 25 deletions(-) rename tests/integration/features/{ => conversation}/add-participant.feature (100%) rename tests/integration/features/{ => conversation}/delete-room.feature (100%) rename tests/integration/features/{ => conversation}/one-to-one.feature (100%) rename tests/integration/features/{ => conversation}/promotion-demotion.feature (100%) rename tests/integration/features/{ => conversation}/public-private.feature (100%) rename tests/integration/features/{ => conversation}/remove-participant.feature (100%) rename tests/integration/features/{ => conversation}/remove-self.feature (100%) rename tests/integration/features/{ => conversation}/rename-room.feature (100%) rename tests/integration/features/{ => conversation}/set-password.feature (100%) diff --git a/.drone.yml b/.drone.yml index dc564d035..189cffc4b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -146,7 +146,7 @@ pipeline: # Run integration tests - cd tests/integration/ - - bash run.sh + - bash run.sh $TESTS_INTEGRATION when: matrix: TESTS: php7.1-integration @@ -159,7 +159,7 @@ pipeline: when: matrix: TESTS: jsunit - acceptance-chat: + acceptance: image: nextcloudci/acceptance-php7.1:acceptance-php7.1-2 environment: - APP_NAME=spreed @@ -173,53 +173,82 @@ pipeline: - 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 + - tests/acceptance/run-local.sh --acceptance-tests-dir apps/spreed/tests/acceptance --timeout-multiplier 10 --nextcloud-server-domain acceptance --selenium-server selenium:4444 allow-git-repository-modifications features/$TESTS_ACCEPTANCE.feature when: matrix: - TESTS-ACCEPTANCE: chat - acceptance-conversation: - image: nextcloudci/acceptance-php7.1:acceptance-php7.1-2 - environment: - - APP_NAME=spreed - - CORE_BRANCH=stable15 - commands: - # Pre-setup steps - - git clone --depth 1 -b $CORE_BRANCH https://github.com/nextcloud/server ../server - - cp -R . ../server/apps/$APP_NAME - - 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 + TESTS: acceptance matrix: include: + # Checks - TESTS: eslint - TESTS: stylelint - TESTS: check-app-compatbility - TESTS: handlebars - TESTS: syntax-php7.0 - TESTS: signed-off-check + + # Unit tests - TESTS: php7.0 - TESTS: php7.1 - TESTS: php7.2 + - TESTS: jsunit + + # Integration tests sqlite - TESTS: php7.1-integration + TESTS_INTEGRATION: features/callapi DB: sqlite - TESTS: php7.1-integration + TESTS_INTEGRATION: features/chat + DB: sqlite + - TESTS: php7.1-integration + TESTS_INTEGRATION: features/conversation + DB: sqlite + - TESTS: php7.1-integration + TESTS_INTEGRATION: features/sharing + DB: sqlite + + # Integration tests MySQL 5.7 + - TESTS: php7.1-integration + TESTS_INTEGRATION: features/callapi DB: mysql DATABASEHOST: mysql-5.7 - TESTS: php7.1-integration + TESTS_INTEGRATION: features/chat + DB: mysql + DATABASEHOST: mysql-5.7 + - TESTS: php7.1-integration + TESTS_INTEGRATION: features/conversation + DB: mysql + DATABASEHOST: mysql-5.7 + - TESTS: php7.1-integration + TESTS_INTEGRATION: features/sharing + DB: mysql + DATABASEHOST: mysql-5.7 + + # Integration tests Postgres 10 + - TESTS: php7.1-integration + TESTS_INTEGRATION: features/callapi DB: pgsql DATABASEHOST: postgres-10 - - TESTS: jsunit + - TESTS: php7.1-integration + TESTS_INTEGRATION: features/chat + DB: pgsql + DATABASEHOST: postgres-10 + - TESTS: php7.1-integration + TESTS_INTEGRATION: features/conversation + DB: pgsql + DATABASEHOST: postgres-10 + - TESTS: php7.1-integration + TESTS_INTEGRATION: features/sharing + DB: pgsql + DATABASEHOST: postgres-10 + + # Acceptance tests - TESTS: acceptance - TESTS-ACCEPTANCE: chat + TESTS_ACCEPTANCE: chat - TESTS: acceptance - TESTS-ACCEPTANCE: conversation + TESTS_ACCEPTANCE: conversation services: mysql-5.7: diff --git a/tests/integration/features/add-participant.feature b/tests/integration/features/conversation/add-participant.feature similarity index 100% rename from tests/integration/features/add-participant.feature rename to tests/integration/features/conversation/add-participant.feature diff --git a/tests/integration/features/delete-room.feature b/tests/integration/features/conversation/delete-room.feature similarity index 100% rename from tests/integration/features/delete-room.feature rename to tests/integration/features/conversation/delete-room.feature diff --git a/tests/integration/features/one-to-one.feature b/tests/integration/features/conversation/one-to-one.feature similarity index 100% rename from tests/integration/features/one-to-one.feature rename to tests/integration/features/conversation/one-to-one.feature diff --git a/tests/integration/features/promotion-demotion.feature b/tests/integration/features/conversation/promotion-demotion.feature similarity index 100% rename from tests/integration/features/promotion-demotion.feature rename to tests/integration/features/conversation/promotion-demotion.feature diff --git a/tests/integration/features/public-private.feature b/tests/integration/features/conversation/public-private.feature similarity index 100% rename from tests/integration/features/public-private.feature rename to tests/integration/features/conversation/public-private.feature diff --git a/tests/integration/features/remove-participant.feature b/tests/integration/features/conversation/remove-participant.feature similarity index 100% rename from tests/integration/features/remove-participant.feature rename to tests/integration/features/conversation/remove-participant.feature diff --git a/tests/integration/features/remove-self.feature b/tests/integration/features/conversation/remove-self.feature similarity index 100% rename from tests/integration/features/remove-self.feature rename to tests/integration/features/conversation/remove-self.feature diff --git a/tests/integration/features/rename-room.feature b/tests/integration/features/conversation/rename-room.feature similarity index 100% rename from tests/integration/features/rename-room.feature rename to tests/integration/features/conversation/rename-room.feature diff --git a/tests/integration/features/set-password.feature b/tests/integration/features/conversation/set-password.feature similarity index 100% rename from tests/integration/features/set-password.feature rename to tests/integration/features/conversation/set-password.feature