Skip to content

Commit

Permalink
DT-1201: Run BLT tests with ORCA fixture (#4064)
Browse files Browse the repository at this point in the history
* Run tests in ORCA.

* Use ORCA fixture as master sandbox.

* Strict coding standards.

* No need for separate jobs.

* Fix symlink to be absolute.

* Link issue.

* Fixing tests.

* getting tests working

* phpcs error

* whops

* test symfony console fix

* Remove BLT_ENV.

* cleanup

* fixing tests

* fixing tests

* patch orca

* See if we can use pre-installed drupal.

* optimize
  • Loading branch information
danepowell committed Mar 20, 2020
1 parent 1631865 commit 993f1d0
Show file tree
Hide file tree
Showing 34 changed files with 188 additions and 795 deletions.
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ env:
- ORCA_SUT_NAME=acquia/blt
- ORCA_SUT_BRANCH=12.x
- ORCA_VERSION=dev-develop
- ORCA_PHPCS_STANDARD=AcquiaDrupalStrict
# Custom configuration.
- COMPOSER_BIN=$TRAVIS_BUILD_DIR/vendor/bin
- BLT_DIR=$TRAVIS_BUILD_DIR
Expand All @@ -39,16 +40,13 @@ jobs:
# Standard ORCA jobs.
- { name: "Static code analysis", env: ORCA_JOB=STATIC_CODE_ANALYSIS }
- { name: "D9 readiness test", php: "7.3", env: ORCA_JOB=D9_READINESS}
# Custom jobs.
- env: DRUPAL_CORE_VERSION=default PHPUNIT_EXCLUDE_GROUP='drupal,requires-vm,d8'
- env: DRUPAL_CORE_VERSION=default PHPUNIT_EXCLUDE_GROUP='drupal,requires-vm,d8'
php: "7.4"

before_install:
# Exit build early if only documentation was changed in a Pull Request.
- source ${BLT_DIR}/scripts/travis/exit_early
# Install ORCA.
- composer create-project --no-dev acquia/orca ../orca "$ORCA_VERSION"
- curl https://patch-diff.githubusercontent.com/raw/acquia/orca/pull/74.patch | git -C ../orca apply
- ../orca/bin/travis/before_install.sh

install:
Expand Down
45 changes: 0 additions & 45 deletions RoboFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,6 @@ class RoboFile extends Tasks implements LoggerAwareInterface {
*/
protected $bin;

/**
* Drupal PHPCS standard.
*
* @var string
*/
protected $drupalPhpcsStandard;

/**
* PHPCS paths.
*
* @var string
*/
protected $phpcsPaths;

const BLT_DEV_BRANCH = "10.x";
const BLT_PROJECT_DIR = "../blted8";

/**
* This hook will fire for all commands in this command file.
*
Expand All @@ -58,34 +41,6 @@ public function initialize() {
$this->bin = $this->bltRoot . '/vendor/bin';
}

/**
* Executes pre-release tests against blt-project self::BLT_DEV_BRANCH.
*/
public function releaseTest() {
$task = $this->taskExecStack()
->printMetadata(TRUE)
->exec("{$this->bltRoot}/vendor/bin/robo sniff-code --load-from {$this->bltRoot}");

$phpunit_group = getenv('PHPUNIT_GROUP');
$phpunit_exclude_group = getenv('PHPUNIT_EXCLUDE_GROUP');
$phpunit_filter = getenv('PHPUNIT_FILTER');
$phpunit_command_string = "{$this->bltRoot}/vendor/bin/phpunit";
if ($phpunit_group) {
$phpunit_command_string .= " --group=" . $phpunit_group;
}
if ($phpunit_exclude_group) {
$phpunit_command_string .= " --exclude-group=" . $phpunit_exclude_group;
}
if ($phpunit_filter) {
$phpunit_command_string .= " --filter " . $phpunit_filter;
}
$task->exec($phpunit_command_string);

$result = $task->run();

return $result;
}

/**
* Generates release notes and cuts a new tag on GitHub.
*
Expand Down

0 comments on commit 993f1d0

Please sign in to comment.