Skip to content

Commit

Permalink
Merge branch 'hotfix/1.5.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
TravisCarden committed Apr 1, 2020
2 parents 9034fb1 + 46719b2 commit 2c6e654
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 20 deletions.
7 changes: 3 additions & 4 deletions bin/travis/_includes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@ function assert_env_vars {
ORCA_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
export ORCA_ROOT
export ORCA_FIXTURE_DIR=${ORCA_FIXTURE_DIR:="$ORCA_ROOT/../orca-build"}
export ORCA_FIXTURE_PROFILE=${ORCA_FIXTURE_PROFILE:="orca"}
export ORCA_SUT_DIR=${ORCA_SUT_DIR:=${TRAVIS_BUILD_DIR}}
export ORCA_SUT_HAS_NIGHTWATCH_TESTS=$(cd "$ORCA_SUT_DIR"; find . -regex ".*/Nightwatch/.*" -name \*.js)
export ORCA_SUT_MACHINE_NAME=${ORCA_SUT_NAME##*\/}
export ORCA_FIXTURE_PROFILE=${ORCA_FIXTURE_PROFILE:="orca"}
export ORCA_TELEMETRY_ENABLE=${ORCA_TELEMETRY_ENABLE:="FALSE"}
export ORCA_AMPLITUDE_USER_ID=${ORCA_AMPLITUDE_USER_ID:="$ORCA_SUT_NAME:$ORCA_SUT_BRANCH"}
export ORCA_ENABLE_NIGHTWATCH=${ORCA_ENABLE_NIGHTWATCH:="TRUE"}
export ORCA_YARN_DIR="${ORCA_FIXTURE_DIR}/docroot/core"
export DRUPAL_NIGHTWATCH_IGNORE_DIRECTORIES="node_modules,vendor,.*,sites/*/files,sites/*/private,sites/simpletest"
export DRUPAL_NIGHTWATCH_OUTPUT="sites/default/reports/nightwatch"
Expand All @@ -48,9 +50,6 @@ 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"
# This "bult-in" variable isn't available to scripts and must be set manually.
TRAVIS_NODE_VERSION="$(node -v 2> /dev/null)"
export TRAVIS_NODE_VERSION

# Override the available columns setting to prevent Drush output from wrapping
# too narrowly.
Expand Down
10 changes: 4 additions & 6 deletions bin/travis/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ cd "$(dirname "$0")" || exit; source _includes.sh

assert_env_vars

RUN_NIGHTWATCH=TRUE
case "$ORCA_JOB" in
"STATIC_CODE_ANALYSIS") unset RUN_NIGHTWATCH ;;
"DEPRECATED_CODE_SCAN") orca debug:packages; eval "orca fixture:init -f --sut=$ORCA_SUT_NAME --sut-only --no-site-install"; unset RUN_NIGHTWATCH ;;
"DEPRECATED_CODE_SCAN_CONTRIB") orca debug:packages; eval "orca fixture:init -f --no-site-install"; unset RUN_NIGHTWATCH ;;
"STATIC_CODE_ANALYSIS") unset ORCA_ENABLE_NIGHTWATCH ;;
"DEPRECATED_CODE_SCAN") orca debug:packages; eval "orca fixture:init -f --sut=$ORCA_SUT_NAME --sut-only --no-site-install"; unset ORCA_ENABLE_NIGHTWATCH ;;
"DEPRECATED_CODE_SCAN_CONTRIB") orca debug:packages; eval "orca fixture:init -f --no-site-install"; unset ORCA_ENABLE_NIGHTWATCH ;;
"ISOLATED_RECOMMENDED") orca debug:packages CURRENT_RECOMMENDED; eval "orca fixture:init -f --sut=$ORCA_SUT_NAME --sut-only --core=CURRENT_RECOMMENDED --profile=$ORCA_FIXTURE_PROFILE" ;;
"INTEGRATED_RECOMMENDED") orca debug:packages CURRENT_RECOMMENDED; eval "orca fixture:init -f --sut=$ORCA_SUT_NAME --core=CURRENT_RECOMMENDED --profile=$ORCA_FIXTURE_PROFILE" ;;
"CORE_PREVIOUS") orca debug:packages PREVIOUS_RELEASE; eval "orca fixture:init -f --sut=$ORCA_SUT_NAME --core=PREVIOUS_RELEASE --profile=$ORCA_FIXTURE_PROFILE" ;;
Expand All @@ -28,8 +27,7 @@ case "$ORCA_JOB" in
"CUSTOM") eval "orca fixture:init -f --sut=$ORCA_SUT_NAME --profile=$ORCA_FIXTURE_PROFILE ${ORCA_CUSTOM_FIXTURE_INIT_ARGS:=}" ;;
esac

# Install yarn on relevant jobs if Node is installed and a fixture exists.
if [[ "$RUN_NIGHTWATCH" && "$TRAVIS_NODE_VERSION" && -d "$ORCA_YARN_DIR" ]]; then
if [[ "$ORCA_ENABLE_NIGHTWATCH" && "$ORCA_SUT_HAS_NIGHTWATCH_TESTS" && -d "$ORCA_YARN_DIR" ]]; then
(
cd "$ORCA_YARN_DIR" || exit
eval "yarn install"
Expand Down
11 changes: 4 additions & 7 deletions bin/travis/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ assert_env_vars
# Thus if the SUT changes it, only its own tests are run.
[[ "$ORCA_FIXTURE_PROFILE" = "orca" ]] || SUT_ONLY="--sut-only"

RUN_NIGHTWATCH=TRUE
case "$ORCA_JOB" in
"STATIC_CODE_ANALYSIS") eval "orca qa:static-analysis $ORCA_SUT_DIR"; unset RUN_NIGHTWATCH ;;
"DEPRECATED_CODE_SCAN") eval "orca qa:deprecated-code-scan --sut=$ORCA_SUT_NAME"; unset RUN_NIGHTWATCH ;;
"DEPRECATED_CODE_SCAN_CONTRIB") eval "orca qa:deprecated-code-scan --contrib"; unset RUN_NIGHTWATCH ;;
"STATIC_CODE_ANALYSIS") eval "orca qa:static-analysis $ORCA_SUT_DIR"; unset ORCA_ENABLE_NIGHTWATCH ;;
"DEPRECATED_CODE_SCAN") eval "orca qa:deprecated-code-scan --sut=$ORCA_SUT_NAME"; unset ORCA_ENABLE_NIGHTWATCH ;;
"DEPRECATED_CODE_SCAN_CONTRIB") eval "orca qa:deprecated-code-scan --contrib"; unset ORCA_ENABLE_NIGHTWATCH ;;
"ISOLATED_RECOMMENDED") eval "orca qa:automated-tests --sut=$ORCA_SUT_NAME --sut-only" ;;
"INTEGRATED_RECOMMENDED")
eval "orca qa:automated-tests --sut=$ORCA_SUT_NAME $SUT_ONLY --phpunit"
Expand All @@ -47,9 +46,7 @@ case "$ORCA_JOB" in
"CUSTOM") eval "orca qa:automated-tests --sut=$ORCA_SUT_NAME ${ORCA_CUSTOM_TESTS_RUN_ARGS:=}" ;;
esac

# Run Nightwatch tests on relevant jobs if Node is installed and a fixture
# exists.
if [[ "$RUN_NIGHTWATCH" && "$TRAVIS_NODE_VERSION" && -d "$ORCA_YARN_DIR" ]]; then
if [[ "$ORCA_ENABLE_NIGHTWATCH" && "$ORCA_SUT_HAS_NIGHTWATCH_TESTS" && -d "$ORCA_YARN_DIR" ]]; then
(
cd "$ORCA_YARN_DIR" || exit
orca fixture:run-server &
Expand Down
2 changes: 1 addition & 1 deletion config/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.5.0
v1.5.1
3 changes: 1 addition & 2 deletions example/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ version: ~> 1.0
# @see https://docs.acquia.com/acquia-cloud/arch/tech-platform/
php: "7.2"

# Uncomment the following line to run Nightwatch tests in your package.
# node_js: "lts/*"
node_js: "lts/*"

addons:
# Chrome is used via ChromeDriver by PHPUnit and Behat.
Expand Down
2 changes: 2 additions & 0 deletions src/Command/Debug/DebugEnvVarsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ class DebugEnvVarsCommand extends Command {
'ORCA_PACKAGES_CONFIG_ALTER',
'ORCA_PHPCS_STANDARD',
'ORCA_ROOT',
'ORCA_ENABLE_NIGHTWATCH',
'ORCA_SUT_BRANCH',
'ORCA_SUT_DIR',
'ORCA_SUT_HAS_NIGHTWATCH_TESTS',
'ORCA_SUT_MACHINE_NAME',
'ORCA_SUT_NAME',
'ORCA_TELEMETRY_ENABLE',
Expand Down

0 comments on commit 2c6e654

Please sign in to comment.