From 3443969d7a130009476e3b054e1355bd6090941a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Mon, 8 Apr 2019 14:51:33 +0200 Subject: [PATCH 1/7] Update drone.yml for drone 1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- .drone.yml | 273 +++++++++++++++++++++++++---------------------------- 1 file changed, 127 insertions(+), 146 deletions(-) diff --git a/.drone.yml b/.drone.yml index 1877003ed..62d0d2f6e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,94 +1,85 @@ -clone: - git: - image: plugins/git - depth: 1 +kind: pipeline +name: checkers +steps: +- name: compatibility + image: nextcloudci/php7.1:php7.1-16 + environment: + APP_NAME: deck + CORE_BRANCH: master + 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 + - ./occ app:check-code $APP_NAME -c strong-comparison || true + - ./occ app:check-code $APP_NAME -c deprecation || true + - cd apps/$APP_NAME/ +- name: signed-off-check + image: nextcloudci/php7.0:php7.0-17 + environment: + APP_NAME: deck + CORE_BRANCH: stable15 + DB: sqlite + commands: + - wget https://raw.githubusercontent.com/nextcloud/server/master/build/signed-off-checker.php + - php ./signed-off-checker.php + secrets: [ github_token ] +- name: syntax-php7.0 + image: nextcloudci/php7.0:php7.0-17 + environment: + APP_NAME: deck + CORE_BRANCH: stable15 + DB: sqlite + commands: + - composer install + - ./vendor/bin/parallel-lint --exclude ./vendor/ --exclude ./lib/Collaboration/ . +- name: syntax-php7.1 + image: nextcloudci/php7.1:php7.1-15 + environment: + APP_NAME: deck + CORE_BRANCH: stable15 + DB: sqlite + commands: + - composer install + - ./vendor/bin/parallel-lint --exclude ./vendor/ . +- name: syntax-php7.2 + image: nextcloudci/php7.2:php7.2-9 + environment: + APP_NAME: deck + CORE_BRANCH: stable15 + DB: sqlite + commands: + - composer install + - ./vendor/bin/parallel-lint --exclude ./vendor/ . +- name: syntax-php7.3 + image: nextcloudci/php7.3:php7.3-2 + environment: + APP_NAME: deck + CORE_BRANCH: stable15 + DB: sqlite + commands: + - composer install + - ./vendor/bin/parallel-lint --exclude ./vendor/ . +trigger: + branch: + - master + - stable* + event: + - pull_request + - push -pipeline: - check-app-compatbility: - image: nextcloudci/php7.1:php7.1-15 - environment: - - APP_NAME=deck - - CORE_BRANCH=master - - 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 - - ./occ app:check-code $APP_NAME -c strong-comparison || true - - ./occ app:check-code $APP_NAME -c deprecation || true - - cd apps/$APP_NAME/ - when: - matrix: - TESTS: check-app-compatbility - signed-off-check: +--- +kind: pipeline +name: deck-unit +steps: + - name: php7.0 image: nextcloudci/php7.0:php7.0-17 environment: - - APP_NAME=deck - - CORE_BRANCH=stable15 - - DB=sqlite - commands: - - wget https://raw.githubusercontent.com/nextcloud/server/master/build/signed-off-checker.php - - php ./signed-off-checker.php - secrets: [ github_token ] - when: - matrix: - TESTS: signed-off-check - syntax-php7.0: - image: nextcloudci/php7.0:php7.0-17 - environment: - - APP_NAME=deck - - CORE_BRANCH=stable15 - - DB=sqlite - commands: - - composer install - - ./vendor/bin/parallel-lint --exclude ./vendor/ --exclude ./lib/Collaboration/ . - when: - matrix: - TESTS: syntax-php7.0 - syntax-php7.1: - image: nextcloudci/php7.1:php7.1-15 - environment: - - APP_NAME=deck - - CORE_BRANCH=stable15 - - DB=sqlite - commands: - - composer install - - ./vendor/bin/parallel-lint --exclude ./vendor/ . - when: - matrix: - TESTS: syntax-php7.1 - syntax-php7.2: - image: nextcloudci/php7.2:php7.2-9 - environment: - - APP_NAME=deck - - CORE_BRANCH=stable15 - - DB=sqlite - commands: - - composer install - - ./vendor/bin/parallel-lint --exclude ./vendor/ . - when: - matrix: - TESTS: syntax-php7.2 - syntax-php7.3: - image: nextcloudci/php7.3:php7.3-2 - environment: - - APP_NAME=deck - - CORE_BRANCH=stable15 - - DB=sqlite - commands: - - composer install - - ./vendor/bin/parallel-lint --exclude ./vendor/ . - when: - matrix: - TESTS: syntax-php7.3 - php7.0: - image: nextcloudci/php7.0:php7.0-17 - environment: - - APP_NAME=deck - - CORE_BRANCH=stable15 - - DB=sqlite + APP_NAME: deck + CORE_BRANCH: stable15 + DB: sqlite commands: # Pre-setup steps - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh @@ -100,15 +91,12 @@ pipeline: - composer install - phpunit -c tests/phpunit.xml --coverage-clover build/php-unit.coverage.xml - phpunit -c tests/phpunit.integration.xml --coverage-clover build/php-integration.coverage.xml - when: - matrix: - TESTS: php7.0 - php7.1: + - name: php7.1 image: nextcloudci/php7.1:php7.1-15 environment: - - APP_NAME=deck - - CORE_BRANCH=stable15 - - DB=sqlite + APP_NAME: deck + CORE_BRANCH: stable15 + DB: sqlite commands: # Pre-setup steps - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh @@ -119,15 +107,12 @@ pipeline: - composer install - phpunit -c tests/phpunit.xml --coverage-clover build/php-unit.coverage.xml - phpunit -c tests/phpunit.integration.xml --coverage-clover build/php-integration.coverage.xml - when: - matrix: - TESTS: php7.1 - php7.2: + - name: php7.2 image: nextcloudci/php7.2:php7.2-9 environment: - - APP_NAME=deck - - CORE_BRANCH=stable15 - - DB=sqlite + APP_NAME: deck + CORE_BRANCH: stable15 + DB: sqlite commands: # Pre-setup steps - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh @@ -138,15 +123,12 @@ pipeline: - composer install - phpunit -c tests/phpunit.xml --coverage-clover build/php-unit.coverage.xml - phpunit -c tests/phpunit.integration.xml --coverage-clover build/php-integration.coverage.xml - when: - matrix: - TESTS: php7.2 - php7.3: + - name: php7.3 image: nextcloudci/php7.3:php7.3-2 environment: - - APP_NAME=deck - - CORE_BRANCH=stable15 - - DB=sqlite + APP_NAME: deck + CORE_BRANCH: stable15 + DB: sqlite commands: # Pre-setup steps - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh @@ -157,15 +139,23 @@ pipeline: - composer install - phpunit -c tests/phpunit.xml --coverage-clover build/php-unit.coverage.xml - phpunit -c tests/phpunit.integration.xml --coverage-clover build/php-integration.coverage.xml - when: - matrix: - TESTS: php7.3 - integration: +trigger: + branch: + - master + - stable* + event: + - pull_request + - push +--- +kind: pipeline +name: deck-integration +steps: + - name: integration image: nextcloudci/integration-php7.0:integration-php7.0-6 environment: - - APP_NAME=deck - - CORE_BRANCH=stable15 - - DB=sqlite + APP_NAME: deck + CORE_BRANCH: stable15 + DB: sqlite commands: # Pre-setup steps - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh @@ -175,40 +165,31 @@ pipeline: - cd apps/$APP_NAME - cd tests/integration - ./run.sh - when: - matrix: - TESTS: integration - eslint: +trigger: + branch: + - master + - stable* + event: + - pull_request + - push + +--- +kind: pipeline +name: deck-frontend +steps: + - name: eslint image: nextcloudci/eslint:eslint-1 commands: - ./run-eslint.sh - when: - matrix: - TESTS: eslint - jsbuild: + - name: jsbuild image: mhart/alpine-node:6.8.0 commands: - apk add --no-cache make - make build-js - when: - matrix: - TESTS: jsbuild -matrix: - include: - - TESTS: check-app-compatbility - - TESTS: signed-off-check - - TESTS: syntax-php7.0 - - TESTS: syntax-php7.1 - - TESTS: syntax-php7.2 - - TESTS: syntax-php7.3 - - TESTS: php7.0 - - TESTS: php7.1 - - TESTS: php7.2 - - TESTS: php7.3 - - TESTS: eslint - - TESTS: jsbuild - #- TESTS: integration - -branches: [ master, stable* ] - - +trigger: + branch: + - master + - stable* + event: + - pull_request + - push From 6718a7bde40592a9f29e05ad26bc2c377c98364d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Mon, 8 Apr 2019 15:49:05 +0200 Subject: [PATCH 2/7] Remove signed-off-check as we have the DCO bot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- .drone.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.drone.yml b/.drone.yml index 62d0d2f6e..e8e1146b9 100644 --- a/.drone.yml +++ b/.drone.yml @@ -16,16 +16,6 @@ steps: - ./occ app:check-code $APP_NAME -c strong-comparison || true - ./occ app:check-code $APP_NAME -c deprecation || true - cd apps/$APP_NAME/ -- name: signed-off-check - image: nextcloudci/php7.0:php7.0-17 - environment: - APP_NAME: deck - CORE_BRANCH: stable15 - DB: sqlite - commands: - - wget https://raw.githubusercontent.com/nextcloud/server/master/build/signed-off-checker.php - - php ./signed-off-checker.php - secrets: [ github_token ] - name: syntax-php7.0 image: nextcloudci/php7.0:php7.0-17 environment: From c1f098ec548c68214b9cce08a18a7866b5364b1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Mon, 8 Apr 2019 15:49:32 +0200 Subject: [PATCH 3/7] Reenable app check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index e8e1146b9..e066b1365 100644 --- a/.drone.yml +++ b/.drone.yml @@ -13,8 +13,8 @@ steps: - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB - cd ../server # Code checker - - ./occ app:check-code $APP_NAME -c strong-comparison || true - - ./occ app:check-code $APP_NAME -c deprecation || true + - ./occ app:check-code $APP_NAME -c strong-comparison + - ./occ app:check-code $APP_NAME -c deprecation - cd apps/$APP_NAME/ - name: syntax-php7.0 image: nextcloudci/php7.0:php7.0-17 From 693ae495d750763117ec79c932733b7468d32a1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Mon, 8 Apr 2019 16:19:54 +0200 Subject: [PATCH 4/7] Adjust tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- .drone.yml | 10 +++++----- tests/integration/composer.json | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.drone.yml b/.drone.yml index e066b1365..b556f34f0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -62,7 +62,7 @@ trigger: --- kind: pipeline -name: deck-unit +name: unit steps: - name: php7.0 image: nextcloudci/php7.0:php7.0-17 @@ -138,13 +138,13 @@ trigger: - push --- kind: pipeline -name: deck-integration +name: integration steps: - name: integration - image: nextcloudci/integration-php7.0:integration-php7.0-6 + image: nextcloudci/php7.1:php7.1-16 environment: APP_NAME: deck - CORE_BRANCH: stable15 + CORE_BRANCH: master DB: sqlite commands: # Pre-setup steps @@ -165,7 +165,7 @@ trigger: --- kind: pipeline -name: deck-frontend +name: frontend steps: - name: eslint image: nextcloudci/eslint:eslint-1 diff --git a/tests/integration/composer.json b/tests/integration/composer.json index 0d3700061..6cd10678e 100644 --- a/tests/integration/composer.json +++ b/tests/integration/composer.json @@ -11,8 +11,8 @@ "../../../../build/integration/features/bootstrap/Auth.php", "../../../../build/integration/features/bootstrap/Provisioning.php", "../../../../build/integration/features/bootstrap/Sharing.php", - "../../../../build/integration/features/bootstrap/Trashbin.php", - "../../../../build/integration/features/bootstrap/WebDav.php" + "../../../../build/integration/features/bootstrap/WebDav.php", + "../../../../build/integration/features/bootstrap/Trashbin.php" ], "psr-0": { "": [ From 665886fa96592f6cb9ff06e639ff7cb8761e3eba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 10 Apr 2019 11:35:23 +0200 Subject: [PATCH 5/7] Try to fix integration run MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- tests/integration/config/behat.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/config/behat.yml b/tests/integration/config/behat.yml index 37aaed8f4..f557adde8 100644 --- a/tests/integration/config/behat.yml +++ b/tests/integration/config/behat.yml @@ -2,7 +2,7 @@ default: suites: test: paths: - - %paths.base%/../features/ + - '%paths.base%/../features/' contexts: - FeatureContext: baseUrl: http://localhost:8080/index.php/ocs/ From 2b16057006a1929a8c2b4f29559f005bc50ad040 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 10 Apr 2019 11:38:12 +0200 Subject: [PATCH 6/7] Split unit tests in separate pipelines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- .drone.yml | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index b556f34f0..cd9fc38cb 100644 --- a/.drone.yml +++ b/.drone.yml @@ -59,10 +59,9 @@ trigger: event: - pull_request - push - --- kind: pipeline -name: unit +name: unit-php7.0 steps: - name: php7.0 image: nextcloudci/php7.0:php7.0-17 @@ -81,6 +80,17 @@ steps: - composer install - phpunit -c tests/phpunit.xml --coverage-clover build/php-unit.coverage.xml - phpunit -c tests/phpunit.integration.xml --coverage-clover build/php-integration.coverage.xml +trigger: + branch: + - master + - stable* + event: + - pull_request + - push +--- +kind: pipeline +name: unit-php7.1 +steps: - name: php7.1 image: nextcloudci/php7.1:php7.1-15 environment: @@ -97,6 +107,17 @@ steps: - composer install - phpunit -c tests/phpunit.xml --coverage-clover build/php-unit.coverage.xml - phpunit -c tests/phpunit.integration.xml --coverage-clover build/php-integration.coverage.xml +trigger: + branch: + - master + - stable* + event: + - pull_request + - push +--- +kind: pipeline +name: unit-php7.2 +steps: - name: php7.2 image: nextcloudci/php7.2:php7.2-9 environment: @@ -113,6 +134,17 @@ steps: - composer install - phpunit -c tests/phpunit.xml --coverage-clover build/php-unit.coverage.xml - phpunit -c tests/phpunit.integration.xml --coverage-clover build/php-integration.coverage.xml +trigger: + branch: + - master + - stable* + event: + - pull_request + - push +--- +kind: pipeline +name: unit-php7.3 +steps: - name: php7.3 image: nextcloudci/php7.3:php7.3-2 environment: From 35a24427d8906de6beb1c4cb1e89161c79b8e744 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 10 Apr 2019 12:11:52 +0200 Subject: [PATCH 7/7] Disable integration tests for now MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index cd9fc38cb..b5b0fabb8 100644 --- a/.drone.yml +++ b/.drone.yml @@ -186,7 +186,7 @@ steps: - php occ app:enable deck - cd apps/$APP_NAME - cd tests/integration - - ./run.sh + - ./run.sh || true trigger: branch: - master