Skip to content

Commit 823f169

Browse files
committed
Merge branch 'release/2.10.0'
2 parents a046abb + 6c7990c commit 823f169

File tree

160 files changed

+4272
-2634
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+4272
-2634
lines changed

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,15 @@ env:
3131
- ORCA_PACKAGES_CONFIG=example/tests/packages.yml
3232
- ORCA_PACKAGES_CONFIG_ALTER=example/tests/packages_alter.yml
3333
- ORCA_SUT_DIR=${TRAVIS_BUILD_DIR}/../example
34+
- ORCA_SELF_TEST_COVERAGE_CLOVER=$HOME/build/logs/clover-self.xml
3435

3536
jobs:
3637
fast_finish: true
3738
include:
3839
- { name: "Static code analysis", env: ORCA_JOB=STATIC_CODE_ANALYSIS }
3940
- { name: "Deprecated code scan", env: ORCA_JOB=DEPRECATED_CODE_SCAN }
4041
- { name: "Isolated test w/ recommended package versions", env: ORCA_JOB=ISOLATED_RECOMMENDED }
42+
- { name: "Isolated test w/ recommended package versions and code coverage", env: ORCA_JOB=ISOLATED_RECOMMENDED ORCA_COVERALLS_ENABLE=TRUE }
4143
- { name: "Integrated test w/ recommended package versions", env: ORCA_JOB=INTEGRATED_RECOMMENDED }
4244
- { name: "Integrated test w/ recommended package versions & previous minor release of Drupal core", env: ORCA_JOB=CORE_PREVIOUS }
4345
- { name: "Isolated test w/ dev package versions", env: ORCA_JOB=ISOLATED_DEV }
@@ -66,6 +68,9 @@ script:
6668

6769
after_script:
6870
- ../orca/bin/travis/before_cache.sh
71+
- ../orca/bin/travis/self-test/after_success.sh
72+
- unset ORCA_COVERAGE_ENABLE
73+
- unset ORCA_COVERALLS_ENABLE
6974
- ../orca/bin/travis/after_success.sh
7075
- ../orca/bin/travis/after_failure.sh
7176
- ../orca/bin/travis/after_script.sh

acquia-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version: 1.2.0
44
services:
55
- mysql
66
- php:
7-
version: 7.2
7+
version: 7.3
88

99
events:
1010
build:

bin/orca

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
* ORCA command line executable.
77
*/
88

9-
require 'orca.php';
9+
require __DIR__ . '/orca.php';

bin/orca.php

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
use Stecman\Component\Symfony\Console\BashCompletion\CompletionCommand;
1111
use Symfony\Component\Console\Application;
1212
use Symfony\Component\Console\Input\ArgvInput;
13-
use Symfony\Component\Debug\Debug;
1413
use Symfony\Component\Filesystem\Filesystem;
1514

1615
if (!file_exists(__DIR__ . '/../vendor/autoload.php')) {
@@ -23,19 +22,8 @@
2322

2423
$input = new ArgvInput();
2524
$env = $input->getParameterOption(['--env', '-e'], $_SERVER['APP_ENV'] ?? 'prod', TRUE);
26-
$debug = (bool) ($_SERVER['APP_DEBUG'] ?? ('prod' !== $env)) && !$input->hasParameterOption('--no-debug', TRUE);
2725

28-
if ($debug) {
29-
umask(0000);
30-
31-
// phpcs:disable MySource.Debug.DebugCode.Found
32-
if (class_exists(Debug::class)) {
33-
Debug::enable();
34-
// phpcs:enable
35-
}
36-
}
37-
38-
$kernel = new Kernel($env, $debug);
26+
$kernel = new Kernel($env, FALSE);
3927

4028
// Handle a cache:clear pseudo command. This isn't implemented as a true console
4129
// command because a stale or corrupted cache would render it unusable--

bin/travis/_includes.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ function assert {
2020
fi
2121
}
2222

23+
# Outputs a formatted warning message.
24+
function notice {
25+
CYAN="\e[34m"
26+
NO_COLOR="\033[0m"
27+
printf "\n%bNotice: %b%b\n" "$CYAN" "$1" "$NO_COLOR"
28+
}
29+
2330
# Assert that necessary environment variables are set.
2431
if [[ "$ORCA_JOB" != "DEPRECATED_CODE_SCAN_CONTRIB" ]]; then
2532
assert "$ORCA_SUT_NAME" "Missing required ORCA_SUT_NAME environment variable.\nHint: ORCA_SUT_NAME=drupal/example"
@@ -30,6 +37,9 @@ if [[ ! "$TRAVIS" && "$ORCA_JOB" = "STATIC_CODE_ANALYSIS" ]]; then assert "$ORCA
3037
# Set environment variables.
3138
ORCA_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
3239
export ORCA_ROOT
40+
export ORCA_COVERAGE_CLOVER=${ORCA_COVERAGE_CLOVER:="$HOME/build/logs/clover.xml"}
41+
export ORCA_COVERALLS_ENABLE=${ORCA_COVERALLS_ENABLE:=FALSE}
42+
export ORCA_COVERAGE_ENABLE=${ORCA_COVERAGE_ENABLE:="$ORCA_COVERALLS_ENABLE"}
3343
export ORCA_FIXTURE_DIR=${ORCA_FIXTURE_DIR:="$ORCA_ROOT/../orca-build"}
3444
export ORCA_FIXTURE_PROFILE=${ORCA_FIXTURE_PROFILE:="orca"}
3545
DEFAULT_PROJECT_TEMPLATE=$([[ "$ORCA_JOB" == "D9_READINESS" ]] && echo "acquia/drupal-recommended-project" || echo "acquia/blt-project")

bin/travis/after_script.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,16 @@
99
# DESCRIPTION
1010
# Conditionally logs the job and displays upstream ORCA status.
1111

12-
cd "$(dirname "$0")" || exit; source _includes.sh
12+
cd "$(dirname "$0")" || exit 1; source _includes.sh
1313

1414
# Log the job on cron if telemetry is enabled.
1515
if [[ "$TRAVIS_EVENT_TYPE" = "cron" && "$ORCA_TELEMETRY_ENABLE" = "TRUE" && "$ORCA_AMPLITUDE_API_KEY" && "$ORCA_AMPLITUDE_USER_ID" ]]; then
1616
orca internal:log-job
1717
fi
1818
if [[ "$ORCA_TELEMETRY_ENABLE" = "TRUE" ]]; then
1919
orca internal:log-job --simulate
20+
else
21+
notice "No telemetry data sent."
2022
fi
2123

2224
# Show ORCA's own current build status. A failure may signify an upstream issue

bin/travis/after_success.sh

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,26 @@
11
#!/usr/bin/env bash
22

33
# NAME
4-
# after_success.sh - Not yet implemented.
4+
# after_success.sh - Perform post-success tasks.
55
#
66
# SYNOPSIS
77
# after_success.sh
88
#
99
# DESCRIPTION
10-
# Reserved for future use.
10+
# Conditionally sends code coverage data to Coveralls.
11+
12+
cd "$(dirname "$0")" || exit 1; source _includes.sh
13+
14+
# Send test coverage data to Coveralls (coveralls.io) if enabled.
15+
if [[ "$ORCA_COVERAGE_ENABLE" == TRUE && "$ORCA_COVERALLS_ENABLE" == TRUE ]]; then
16+
(
17+
cd "$ORCA_SUT_DIR" || exit 1
18+
# shellcheck disable=SC1004
19+
eval 'php-coveralls -vv \
20+
--coverage_clover="$ORCA_COVERAGE_CLOVER" \
21+
--json_path="${TMPDIR:-/tmp}/coveralls.json" \
22+
--root_dir="$ORCA_SUT_DIR"'
23+
)
24+
else
25+
notice "No coverage data sent to Coveralls."
26+
fi

bin/travis/before_install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ echo "$TRAVIS_NODE_VERSION"
2323
# Display the Yarn version.
2424
yarn --version
2525

26-
# Disable Xdebug.
27-
phpenv config-rm xdebug.ini
26+
# Disable Xdebug except on code coverage jobs.
27+
[[ "$ORCA_COVERAGE_ENABLE" == TRUE ]] || phpenv config-rm xdebug.ini
2828

2929
{
3030
# Remove PHP memory limit.

bin/travis/self-test/after_success.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env bash
2+
3+
# NAME
4+
# after_success.sh - Perform post-success tasks.
5+
#
6+
# SYNOPSIS
7+
# after_success.sh
8+
#
9+
# DESCRIPTION
10+
# Conditionally sends code coverage data to Coveralls.
11+
12+
cd "$(dirname "$0")" || exit 1; source ../_includes.sh
13+
14+
cd ../../../ || exit 1
15+
16+
# Send test coverage data to Coveralls (coveralls.io).
17+
if [[ "$ORCA_COVERAGE_ENABLE" == TRUE && "$ORCA_COVERALLS_ENABLE" == TRUE ]]; then
18+
# shellcheck disable=SC1004
19+
eval 'php-coveralls -vv \
20+
--coverage_clover="$ORCA_SELF_TEST_COVERAGE_CLOVER" \
21+
--json_path="${TMPDIR:-/tmp}/coveralls.json"'
22+
else
23+
notice "No coverage data sent to Coveralls."
24+
fi

bin/travis/self-test/before_install.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@
99
# DESCRIPTION
1010
# Places an example SUT.
1111

12-
cd "$(dirname "$0")" || exit; source _includes.sh
12+
cd "$(dirname "$0")" || exit 1; source ../_includes.sh
1313

1414
(
1515
cd ../../../
1616
cp -R example ../
17-
git -C ../example init
18-
git -C ../example add --all
19-
git -C ../example commit --message="Initial commit."
20-
git -C ../example branch --move master feature/example
17+
cd ../example || exit 1
18+
git init
19+
git add --all
20+
git commit --message="Initial commit."
21+
git branch --move master feature/example
22+
git remote add origin [email protected]:example/example.git
2123
)

bin/travis/self-test/script.sh

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,25 @@
99
# DESCRIPTION
1010
# Runs static code analysis and automated tests on ORCA itself.
1111

12-
cd "$(dirname "$0")" || exit; source _includes.sh
12+
cd "$(dirname "$0")" || exit 1; source ../_includes.sh
13+
14+
cd ../../../ || exit 1
15+
1316

1417
if [[ "$ORCA_JOB" = "STATIC_CODE_ANALYSIS" ]]; then
15-
(
16-
cd ../../../
17-
./vendor/bin/phpcs
18-
./vendor/bin/parallel-lint --exclude vendor .
19-
./vendor/bin/phpmd . text phpmd.xml.dist --ignore-violations-on-exit
20-
./vendor/bin/phpunit
21-
./vendor/bin/security-checker security:check
22-
)
18+
./vendor/bin/phpcs
19+
./vendor/bin/parallel-lint --exclude vendor .
20+
./vendor/bin/phpmd . text phpmd.xml.dist --ignore-violations-on-exit
21+
./vendor/bin/security-checker security:check
22+
fi
23+
24+
echo
25+
if [[ "$ORCA_COVERAGE_ENABLE" == TRUE ]]; then
26+
eval './vendor/bin/phpunit --coverage-clover="$ORCA_SELF_TEST_COVERAGE_CLOVER"'
27+
else
28+
eval './vendor/bin/phpunit'
2329
fi
2430

25-
if [[ "$ORCA_JOB" = "LIVE_TEST" ]]; then
31+
if [[ "$ORCA_JOB" == "LIVE_TEST" ]]; then
2632
orca qa:automated-tests
2733
fi

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"hassankhan/config": "^2.1",
2222
"myclabs/php-enum": "^1.7",
2323
"oscarotero/env": "^1.2",
24+
"php-coveralls/php-coveralls": "^2.2",
2425
"php-parallel-lint/php-console-highlighter": "^0.4.0",
2526
"php-parallel-lint/php-parallel-lint": "^1.2.0",
2627
"phploc/phploc": "^5.0",
@@ -90,7 +91,8 @@
9091
"phpcs": "phpcs -s --cache=var/cache/phpcs.json",
9192
"phplint": "parallel-lint --exclude vendor --ignore-fails .",
9293
"phpmd": "phpmd . text phpmd.xml.dist --ignore-violations-on-exit",
93-
"phpunit": "phpunit"
94+
"phpunit": "phpunit",
95+
"update-docs": "./bin/orca --format=md > docs/commands.md"
9496
},
9597
"support": {
9698
"issues": "https://github.com/acquia/orca/issues",

0 commit comments

Comments
 (0)