Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Orca 572: Run ACMS Command #445

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 31 additions & 30 deletions .github/workflows/orca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,45 +39,45 @@ jobs:
strategy:
matrix:
orca-job:
- STATIC_CODE_ANALYSIS
- INTEGRATED_TEST_ON_OLDEST_SUPPORTED
- INTEGRATED_TEST_ON_PREVIOUS_MINOR
- INTEGRATED_TEST_ON_LATEST_LTS
# - STATIC_CODE_ANALYSIS
# - INTEGRATED_TEST_ON_OLDEST_SUPPORTED
# - INTEGRATED_TEST_ON_PREVIOUS_MINOR
# - INTEGRATED_TEST_ON_LATEST_LTS
# - INTEGRATED_UPGRADE_TEST_FROM_PREVIOUS_MINOR
- INTEGRATED_TEST_ON_CURRENT
# - INTEGRATED_UPGRADE_TEST_TO_NEXT_MINOR
- ISOLATED_TEST_ON_CURRENT_DEV
- INTEGRATED_TEST_ON_CURRENT_DEV
- STRICT_DEPRECATED_CODE_SCAN
- ISOLATED_TEST_ON_NEXT_MINOR
- INTEGRATED_TEST_ON_NEXT_MINOR
# - ISOLATED_TEST_ON_CURRENT_DEV
# - INTEGRATED_TEST_ON_CURRENT_DEV
# - STRICT_DEPRECATED_CODE_SCAN
# - ISOLATED_TEST_ON_NEXT_MINOR
# - INTEGRATED_TEST_ON_NEXT_MINOR
# - ISOLATED_UPGRADE_TEST_TO_NEXT_MAJOR_BETA_OR_LATER
# - ISOLATED_UPGRADE_TEST_TO_NEXT_MAJOR_DEV
- DEPRECATED_CODE_SCAN_W_CONTRIB
- INTEGRATED_TEST_ON_NEXT_MINOR_DEV
- ISOLATED_TEST_ON_NEXT_MINOR_DEV
# - DEPRECATED_CODE_SCAN_W_CONTRIB
# - INTEGRATED_TEST_ON_NEXT_MINOR_DEV
# - ISOLATED_TEST_ON_NEXT_MINOR_DEV
# - INTEGRATED_UPGRADE_TEST_TO_NEXT_MINOR_DEV
- LOOSE_DEPRECATED_CODE_SCAN
- INTEGRATED_TEST_ON_NEXT_MAJOR_LATEST_MINOR_BETA_OR_LATER
- ISOLATED_TEST_ON_NEXT_MAJOR_LATEST_MINOR_DEV
- INTEGRATED_TEST_ON_NEXT_MAJOR_LATEST_MINOR_DEV
# - LOOSE_DEPRECATED_CODE_SCAN
# - INTEGRATED_TEST_ON_NEXT_MAJOR_LATEST_MINOR_BETA_OR_LATER
# - ISOLATED_TEST_ON_NEXT_MAJOR_LATEST_MINOR_DEV
# - INTEGRATED_TEST_ON_NEXT_MAJOR_LATEST_MINOR_DEV
php-version: [ "8.1" ]
orca-enable-nightwatch: [ "FALSE" ]
orca-coverage-enable: [ "FALSE" ]
include:
# Testing Drupal 10 in php 8.1 with nightwatch and coverage.
- orca-job: ISOLATED_TEST_ON_CURRENT
php-version: "8.1"
orca-enable-nightwatch: "TRUE"
orca-coverage-enable: "TRUE"

# Testing Drupal 10 in php 8.2.
- orca-job: ISOLATED_TEST_ON_CURRENT
php-version: "8.2"

# Testing latest Drupal 9 in php 8.2.
- orca-job: INTEGRATED_TEST_ON_LATEST_LTS
php-version: "8.2"
# include:
# # Testing Drupal 10 in php 8.1 with nightwatch and coverage.
# - orca-job: ISOLATED_TEST_ON_CURRENT
# php-version: "8.1"
# orca-enable-nightwatch: "TRUE"
# orca-coverage-enable: "TRUE"
#
# # Testing Drupal 10 in php 8.2.
# - orca-job: ISOLATED_TEST_ON_CURRENT
# php-version: "8.2"
#
# # Testing latest Drupal 9 in php 8.2.
# - orca-job: INTEGRATED_TEST_ON_LATEST_LTS
# php-version: "8.2"


steps:
Expand Down Expand Up @@ -158,3 +158,4 @@ jobs:
jobs: ${{ toJSON(needs) }}
- name: All checks successful
run: echo "🎉"

2 changes: 2 additions & 0 deletions bin/ci/_includes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ export DRUPAL_TEST_DB_URL="sqlite://localhost/sites/default/files/db.sqlite"
export DRUPAL_TEST_WEBDRIVER_CHROME_ARGS="--disable-gpu --headless --no-sandbox"
export DRUPAL_TEST_WEBDRIVER_HOSTNAME="localhost"
export DRUPAL_TEST_WEBDRIVER_PORT="4444"
export SITESTUDIO_API_KEY="key-cohesion-baseline"
export SITESTUDIO_ORG_KEY="test-cohesion-baseline"

if [[ ! "$ORCA_TEMP_DIR" ]]; then
# GitHub Actions.
Expand Down
14 changes: 14 additions & 0 deletions src/Domain/Fixture/FixtureCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ public function create(FixtureOptions $options): void {
$this->removeComposerConfigPlatform();
$this->replaceCoreRecommendedWithCore();
$this->fixDefaultDependencies();
$this->runAcmsCommands();
$this->addAllowedComposerPlugins();
$this->addCompanyPackages();
$this->composer->updateLockFile();
Expand Down Expand Up @@ -938,6 +939,19 @@ private function setUpFilesDirectories(): void {
], $directories));
}

/**
* Runs ACMS commands.
*/
public function runAcmsCommands(): void {
if ($this->fixtureInspector->getInstalledPackageVersionPretty('acquia/acquia_cms') === '~') {
return;
}
$this->output->section('Run ACMS Site Build');
$this->processRunner->runFixtureVendorBin(['acms', 'acms:build', '--no-interaction']);
$this->output->section('Run ACMS Site Install');
$this->processRunner->runFixtureVendorBin(['acms', 'acms:install', '--no-interaction']);
}

/**
* Customize the fixture.
*/
Expand Down
8 changes: 8 additions & 0 deletions src/Enum/EnvVarEnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
* @method static EnvVarEnum DRUPAL_TEST_WEBDRIVER_CHROME_ARGS()
* @method static EnvVarEnum DRUPAL_TEST_WEBDRIVER_HOSTNAME()
* @method static EnvVarEnum DRUPAL_TEST_WEBDRIVER_PORT()
* @method static EnvVarEnum SITESTUDIO_API_KEY()
* @method static EnvVarEnum SITESTUDIO_ORG_KEY()
*/
class EnvVarEnum extends Enum {

Expand Down Expand Up @@ -93,6 +95,10 @@ class EnvVarEnum extends Enum {
public const DRUPAL_TEST_WEBDRIVER_HOSTNAME = 'DRUPAL_TEST_WEBDRIVER_HOSTNAME';

public const DRUPAL_TEST_WEBDRIVER_PORT = 'DRUPAL_TEST_WEBDRIVER_PORT';
public const SITESTUDIO_API_KEY = 'SITESTUDIO_API_KEY';
public const SITESTUDIO_ORG_KEY = 'SITESTUDIO_ORG_KEY';



/**
* Descriptions for the environment variables.
Expand Down Expand Up @@ -131,6 +137,8 @@ public static function descriptions(): array {
self::DRUPAL_TEST_WEBDRIVER_CHROME_ARGS => 'The Chrome WebDriver arguments (Read-only)',
self::DRUPAL_TEST_WEBDRIVER_HOSTNAME => 'The WebDriver hostname (Read-only)',
self::DRUPAL_TEST_WEBDRIVER_PORT => 'The WebDriver port (Read-only)',
self::SITESTUDIO_API_KEY => 'The Site Studio API Key',
self::SITESTUDIO_ORG_KEY => 'The Site Studio ORG Key',
];
}

Expand Down