diff --git a/.circleci/config.yml b/.circleci/config.yml index 35d637c3ea..e27fe42d2c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,5 @@ # https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs defaults: &defaults - docker: - - image: php:7.1.3-cli working_directory: ~/drush environment: TZ: "/usr/share/zoneinfo/America/Los_Angeles" @@ -16,7 +14,6 @@ jobs: build: <<: *defaults docker: - # We can probably use a standard php container here. Maybe we should make our own w/ everything pre-installed - image: circleci/php:7.1-apache-node environment: - MYSQL_HOST=127.0.0.1 @@ -30,7 +27,6 @@ jobs: build_highest: <<: *defaults docker: - # We can probably use a standard php container here. Maybe we should make our own w/ everything pre-installed - image: circleci/php:7.1-apache-node environment: - MYSQL_HOST=127.0.0.1 @@ -45,7 +41,6 @@ jobs: build_56: <<: *defaults docker: - # We can probably use a standard php container here. Maybe we should make our own w/ everything pre-installed - image: circleci/php:5.6-apache-node environment: - MYSQL_HOST=127.0.0.1 diff --git a/tests/resources/codebase/composer-highest.json b/tests/resources/codebase/composer-highest.json index 723b763b29..5ef875c531 100644 --- a/tests/resources/codebase/composer-highest.json +++ b/tests/resources/codebase/composer-highest.json @@ -1,13 +1,6 @@ { "name": "Site Under Test", "repositories": [ - { - "type": "path", - "url": "%PATH-TO-DRUSH%", - "options": { - "symlink": true - } - }, { "type": "composer", "url": "https://packages.drupal.org/8" diff --git a/tests/resources/codebase/composer.json b/tests/resources/codebase/composer.json index f3f0446d34..8af55e844e 100644 --- a/tests/resources/codebase/composer.json +++ b/tests/resources/codebase/composer.json @@ -1,13 +1,6 @@ { "name": "Site Under Test", "repositories": [ - { - "type": "path", - "url": "%PATH-TO-DRUSH%", - "options": { - "symlink": true - } - }, { "type": "composer", "url": "https://packages.drupal.org/8" diff --git a/unish.sut.php b/unish.sut.php index e7b01b109d..e8b38fa348 100755 --- a/unish.sut.php +++ b/unish.sut.php @@ -32,15 +32,14 @@ function unish_setup_sut($unish_sandbox) { drush_delete_dir($working_dir, TRUE); $codebase = __DIR__ . '/tests/resources/codebase'; drush_copy_dir($codebase, $working_dir); - $composer_json = getenv('COMPOSER') ?: 'composer.json'; - foreach ([$composer_json] as $filename) { - $path = $working_dir . "/$filename"; - if (file_exists($path)) { - $contents = file_get_contents($path); - $new_contents = replace_token($contents); - file_put_contents($path, $new_contents); - } - } + $drush_project_root = escapeshellarg(__DIR__); + $composer_dir = escapeshellarg($working_dir); + // n.b. we expect the COMPOSER environment variable to be set to specify the target composer.json file + // TODO: We could probably use https://github.com/greg-1-anderson/composer-test-scenarios + // with a single composer.json file in tests/resources/codebase/web to manage our test scenarios. + // It might require slight modification to support the path repository below. + $cmd = "composer --working-dir=$composer_dir config repositories.1 '{\"type\":\"path\",\"url\":\"$drush_project_root\",\"options\":{\"symlink\":true}}'"; + passthru($cmd); $alias_contents = <<