From a3e164793e4d12dbc06d7d166a8f8c02277149be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dezs=C5=91=20BICZ=C3=93?= Date: Tue, 21 May 2019 15:30:12 +0200 Subject: [PATCH] Run tests with the latest dev version of the PHP API Client DRUP-241 --- .travis.yml | 16 ++++++++-------- .travis/docker-compose.override.yml | 1 + .travis/prepare-test-env.sh | 9 +++++++++ 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6970b979..429a5201 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,31 +27,31 @@ env: - PHP_VERSION=7.1 DEPENDENCIES="" TEST_ROOT="modules/contrib/apigee_edge/tests" - PHP_VERSION=7.1 DEPENDENCIES="" TEST_ROOT="modules/contrib/apigee_edge/tests" DB_DRIVER=pgsql DB_IMAGE=wodby/postgres:9.6-1.3.1 - PHP_VERSION=7.2 DEPENDENCIES="" TEST_ROOT="modules/contrib/apigee_edge/tests" PHP_IMAGE=wodby/drupal-php:7.2-dev-4.5.0 - - PHP_VERSION=7.1 DRUPAL_CORE=8.7.x-dev DEPENDENCIES="--prefer-lowest" TEST_ROOT="modules/contrib/apigee_edge/tests" + - PHP_VERSION=7.1 DRUPAL_CORE=8.7.x-dev PHP_API_CLIENT_DEV=true DEPENDENCIES="--prefer-lowest" TEST_ROOT="modules/contrib/apigee_edge/tests" # Apigee Edge API product RBAC module tests. - PHP_VERSION=7.1 DEPENDENCIES="--prefer-lowest" TEST_ROOT="modules/contrib/apigee_edge/modules/apigee_edge_apiproduct_rbac/tests" - PHP_VERSION=7.1 DEPENDENCIES="" TEST_ROOT="modules/contrib/apigee_edge/modules/apigee_edge_apiproduct_rbac/tests" - PHP_VERSION=7.1 DEPENDENCIES="" TEST_ROOT="modules/contrib/apigee_edge/modules/apigee_edge_apiproduct_rbac/tests" DB_DRIVER=pgsql DB_IMAGE=wodby/postgres:9.6-1.3.1 - PHP_VERSION=7.2 DEPENDENCIES="" TEST_ROOT="modules/contrib/apigee_edge/modules/apigee_edge_apiproduct_rbac/tests" PHP_IMAGE=wodby/drupal-php:7.2-dev-4.5.0 - - PHP_VERSION=7.1 DRUPAL_CORE=8.7.x-dev DEPENDENCIES="--prefer-lowest" TEST_ROOT="modules/contrib/apigee_edge/modules/apigee_edge_apiproduct_rbac/tests" + - PHP_VERSION=7.1 DRUPAL_CORE=8.7.x-dev PHP_API_CLIENT_DEV=true DEPENDENCIES="--prefer-lowest" TEST_ROOT="modules/contrib/apigee_edge/modules/apigee_edge_apiproduct_rbac/tests" # Apigee Edge Teams module tests. - PHP_VERSION=7.1 DEPENDENCIES="--prefer-lowest" TEST_ROOT="modules/contrib/apigee_edge/modules/apigee_edge_teams/tests" - PHP_VERSION=7.1 DEPENDENCIES="" TEST_ROOT="modules/contrib/apigee_edge/modules/apigee_edge_teams/tests" - PHP_VERSION=7.1 DEPENDENCIES="" TEST_ROOT="modules/contrib/apigee_edge/modules/apigee_edge_teams/tests" DB_DRIVER=pgsql DB_IMAGE=wodby/postgres:9.6-1.3.1 - PHP_VERSION=7.2 DEPENDENCIES="" TEST_ROOT="modules/contrib/apigee_edge/modules/apigee_edge_teams/tests" PHP_IMAGE=wodby/drupal-php:7.2-dev-4.5.0 - - PHP_VERSION=7.1 DRUPAL_CORE=8.7.x-dev DEPENDENCIES="--prefer-lowest" TEST_ROOT="modules/contrib/apigee_edge/modules/apigee_edge_teams/tests" + - PHP_VERSION=7.1 DRUPAL_CORE=8.7.x-dev PHP_API_CLIENT_DEV=true DEPENDENCIES="--prefer-lowest" TEST_ROOT="modules/contrib/apigee_edge/modules/apigee_edge_teams/tests" # Apigee Edge API Docs module tests. - PHP_VERSION=7.1 DEPENDENCIES="--prefer-lowest" TEST_ROOT="modules/contrib/apigee_edge/modules/apigee_edge_apidocs/tests" - PHP_VERSION=7.1 DEPENDENCIES="" TEST_ROOT="modules/contrib/apigee_edge/modules/apigee_edge_apidocs/tests" - PHP_VERSION=7.1 DEPENDENCIES="" TEST_ROOT="modules/contrib/apigee_edge/modules/apigee_edge_apidocs/tests" DB_DRIVER=pgsql DB_IMAGE=wodby/postgres:9.6-1.3.1 - PHP_VERSION=7.2 DEPENDENCIES="" TEST_ROOT="modules/contrib/apigee_edge/modules/apigee_edge_apidocs/tests" PHP_IMAGE=wodby/drupal-php:7.2-dev-4.5.0 - - PHP_VERSION=7.1 DRUPAL_CORE=8.7.x-dev DEPENDENCIES="--prefer-lowest" TEST_ROOT="modules/contrib/apigee_edge/modules/apigee_edge_apidocs/tests" + - PHP_VERSION=7.1 DRUPAL_CORE=8.7.x-dev PHP_API_CLIENT_DEV=true DEPENDENCIES="--prefer-lowest" TEST_ROOT="modules/contrib/apigee_edge/modules/apigee_edge_apidocs/tests" matrix: allow_failures: - - env: PHP_VERSION=7.1 DRUPAL_CORE=8.7.x-dev DEPENDENCIES="--prefer-lowest" TEST_ROOT="modules/contrib/apigee_edge/tests" - - env: PHP_VERSION=7.1 DRUPAL_CORE=8.7.x-dev DEPENDENCIES="--prefer-lowest" TEST_ROOT="modules/contrib/apigee_edge/modules/apigee_edge_apiproduct_rbac/tests" - - env: PHP_VERSION=7.1 DRUPAL_CORE=8.7.x-dev DEPENDENCIES="--prefer-lowest" TEST_ROOT="modules/contrib/apigee_edge/modules/apigee_edge_teams/tests" - - env: PHP_VERSION=7.1 DRUPAL_CORE=8.7.x-dev DEPENDENCIES="--prefer-lowest" TEST_ROOT="modules/contrib/apigee_edge/modules/apigee_edge_apidocs/tests" + - env: PHP_VERSION=7.1 DRUPAL_CORE=8.7.x-dev PHP_API_CLIENT_DEV=true DEPENDENCIES="--prefer-lowest" TEST_ROOT="modules/contrib/apigee_edge/tests" + - env: PHP_VERSION=7.1 DRUPAL_CORE=8.7.x-dev PHP_API_CLIENT_DEV=true DEPENDENCIES="--prefer-lowest" TEST_ROOT="modules/contrib/apigee_edge/modules/apigee_edge_apiproduct_rbac/tests" + - env: PHP_VERSION=7.1 DRUPAL_CORE=8.7.x-dev PHP_API_CLIENT_DEV=true DEPENDENCIES="--prefer-lowest" TEST_ROOT="modules/contrib/apigee_edge/modules/apigee_edge_teams/tests" + - env: PHP_VERSION=7.1 DRUPAL_CORE=8.7.x-dev PHP_API_CLIENT_DEV=true DEPENDENCIES="--prefer-lowest" TEST_ROOT="modules/contrib/apigee_edge/modules/apigee_edge_apidocs/tests" fast_finish: true # TODO Cache Docker images and PHP service build (common parts of the built, like Drupal core install, for a day). diff --git a/.travis/docker-compose.override.yml b/.travis/docker-compose.override.yml index eeef28d9..06374ff6 100644 --- a/.travis/docker-compose.override.yml +++ b/.travis/docker-compose.override.yml @@ -10,6 +10,7 @@ services: - log:/mnt/files/log environment: DRUPAL_CORE: ${DRUPAL_CORE:-} + PHP_API_CLIENT_DEV: ${PHP_API_CLIENT_DEV:-false} DEPENDENCIES: ${DEPENDENCIES:-} # We can not pass these environment variables with `docker-compose run -e` until # this has not been improved. https://github.com/wodby/php/pull/21#issuecomment-361200733 diff --git a/.travis/prepare-test-env.sh b/.travis/prepare-test-env.sh index 8c52a717..d0e8c921 100755 --- a/.travis/prepare-test-env.sh +++ b/.travis/prepare-test-env.sh @@ -40,6 +40,15 @@ if [[ -n "${DRUPAL_CORE}" ]]; then composer require drupal/core:${DRUPAL_CORE} webflo/drupal-core-require-dev:${DRUPAL_CORE} ${COMPOSER_GLOBAL_OPTIONS}; fi +# Allow to run tests with the latest dev version of the Apigee PHP API Client. +if [[ "${PHP_API_CLIENT_DEV}" = true ]]; then + # Little trick that fakes the latest dev version as the latest tagged version + # in the 2.x branch. + composer require apigee/apigee-client-php:"2.x-dev as 2.1024.0" ${COMPOSER_GLOBAL_OPTIONS}; + # For some reasons without this the client files does not get registered. + composer update none +fi + # Downgrade dependencies if needed. # (This fix is necessary since PR#130 had been merged because after that lowest # builds started to fail. Probably caused by a merge plugin issue because this