diff --git a/.circleci/config.yml b/.circleci/config.yml index 423974f5..14d3bd8a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -34,18 +34,6 @@ jobs: name: Configure URL in /etc/hosts command: echo 127.0.0.1 example.ddev.site | sudo tee -a /etc/hosts - # Note: phing and drupal-check have mutually exclusive requirements. - # It'd be better to add drupal-check as a dependency of the drupal project - # rather than as part of the virtual environment, but this will have to do - # for now. Also note, drupal-check is added as part of the-vagrant so it - # is available to run within our VM. - # Note 2: drupal-check is pinned to a known stable version. - - run: - name: Install drupal-check - command: | - composer global require mglaman/drupal-check - ln -s ~/.config/composer/vendor/bin ~/bin - # Composer package cache - restore_cache: keys: @@ -65,10 +53,7 @@ jobs: # Use this copy of the-build - run: name: Replace the default version of the-build with this one - command: rm -r vendor/palantirnet/the-build - - - checkout: - path: ~/example/vendor/palantirnet/the-build + command: composer require --dev --with-all-dependencies palantirnet/the-build:dev-${CIRCLE_BRANCH} # Source cache - update when branch changes - save_cache: diff --git a/composer.json b/composer.json index c3aa7bfe..8b0355a5 100644 --- a/composer.json +++ b/composer.json @@ -15,11 +15,13 @@ "cweagans/composer-patches": "^1.7", "drupal/coder": "^8.3.6", "drush/drush": "^9 || ^10", + "mglaman/drupal-check": "^1.2", "palantirnet/phing-drush-task": "^1.1", "pear/http_request2": "^2.3", "pear/versioncontrol_git": "@dev", "phing/phing": "^2.14", - "phpmd/phpmd": "^2.4" + "phpmd/phpmd": "^2.4", + "phpspec/prophecy-phpunit": "^2" }, "autoload": { "psr-0": { diff --git a/defaults.yml b/defaults.yml index db2dc04d..00b3f969 100644 --- a/defaults.yml +++ b/defaults.yml @@ -267,11 +267,11 @@ phpmd: # Configuration for checking the site with the Drupal Checker code linter. # # @see https://github.com/mglaman/drupal-check -# These values are used in the defaults/build.xml template. +# @see defaults/build.xml drupal-check: - # Location of the drupal-check script. This script is currently installed globally - # because of repository-level composer conflicts. - bin: "~/bin/drupal-check" + # Location of the drupal-check script. This shouldn't need to be overridden, + # but it is used in the defaults/build.xml template. + bin: "vendor/bin/drupal-check" # Comma separated list of directories directories: "${drupal.root}/modules/custom/,${drupal.root}/themes/custom/" diff --git a/defaults/install/.circleci/config.yml b/defaults/install/.circleci/config.yml index ddc6dbea..b1cda175 100644 --- a/defaults/install/.circleci/config.yml +++ b/defaults/install/.circleci/config.yml @@ -46,20 +46,6 @@ jobs: name: Configure URL in /etc/hosts command: echo 127.0.0.1 ${CIRCLE_PROJECT_REPONAME}.local | sudo tee -a /etc/hosts - # Note: phing and drupal-check have mutually exclusive requirements. - # It'd be better to add drupal-check as a dependency of the drupal project - # rather than as part of the virtual environment, but this will have to do - # for now. Also note, drupal-check is added as part of the-vagrant so it - # is available to run within our VM. - # Note 2: drupal-check is pinned to a known stable version. - - run: - name: Install drupal-check - command: | - curl -O -L https://github.com/mglaman/drupal-check/releases/download/1.0.9/drupal-check.phar - mkdir --parents ~/bin - mv drupal-check.phar ~/bin/drupal-check - chmod +x ~/bin/drupal-check - # Composer package cache - restore_cache: keys: diff --git a/defaults/install/build.xml b/defaults/install/build.xml index b74428c3..026f1340 100644 --- a/defaults/install/build.xml +++ b/defaults/install/build.xml @@ -134,8 +134,9 @@ diff --git a/defaults/install/the-build/build.circleci.yml b/defaults/install/the-build/build.circleci.yml index 4acab1ed..e122e1af 100644 --- a/defaults/install/the-build/build.circleci.yml +++ b/defaults/install/the-build/build.circleci.yml @@ -13,6 +13,3 @@ drupal: behat: args: "--profile=circleci --suite=default --strict --format=junit --out=/tmp/artifacts --tags=~@skipci" - -drupal-check: - bin: "/home/circleci/bin/drupal-check" diff --git a/defaults/install/the-build/build.yml b/defaults/install/the-build/build.yml index 29486bb0..b8aeda31 100644 --- a/defaults/install/the-build/build.yml +++ b/defaults/install/the-build/build.yml @@ -53,13 +53,6 @@ drupal: behat: args: "--suite=default --strict" -# Configuration for checking the site with the Drupal Checker code linter. -drupal-check: - # Location of the drupal-check script. This script is currently installed globally - # on the-vagrant because of repository-level composer conflicts. - bin: "~/bin/drupal-check" - - # To build an artifact from your code, add the URL to your artifact git repository. # @see https://github.com/palantirnet/the-build/blob/release-2.0/defaults.yml #