Skip to content

Commit 144f453

Browse files
committed
Merge branch 'release/1.1.0'
2 parents 413c025 + 37d4f66 commit 144f453

File tree

19 files changed

+65
-27
lines changed

19 files changed

+65
-27
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ cache:
1010
directories:
1111
- "$HOME/.composer/cache"
1212
- "$HOME/.drush/cache"
13+
- "$HOME/.rvm"
1314
- "${TMPDIR:-/tmp}/phpstan/cache"
1415

1516
branches:

bin/orca.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
}
1919
require __DIR__ . '/../vendor/autoload.php';
2020

21+
ini_set('memory_limit', -1);
2122
set_time_limit(0);
2223

2324
$input = new ArgvInput();
@@ -40,7 +41,11 @@
4041
// command because a stale or corrupted cache would render it unusable--
4142
// precisely when it is needed.
4243
if (in_array($input->getFirstArgument(), ['cache:clear', 'cc'])) {
43-
(new Filesystem())->remove($kernel->getCacheDir());
44+
$filesystem = new Filesystem();
45+
$cache_dir = $kernel->getCacheDir();
46+
$filesystem->remove($cache_dir);
47+
$filesystem->mkdir($cache_dir);
48+
$filesystem->touch("{$cache_dir}/.gitkeep");
4449
exit;
4550
}
4651

bin/travis/after_script.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,16 @@
77
# after_script.sh
88
#
99
# DESCRIPTION
10-
# Logs the job on cron if telemetry is enabled.
10+
# Conditionally logs the job and displays upstream ORCA status.
1111

1212
cd "$(dirname "$0")" || exit; source _includes.sh
1313

14+
# Log the job on cron if telemetry is enabled.
1415
if [[ "$TRAVIS_EVENT_TYPE" = "cron" && "$ORCA_TELEMETRY_ENABLE" && "$ORCA_AMPLITUDE_API_KEY" && "$ORCA_AMPLITUDE_USER_ID" ]]; then
1516
orca internal:log-job
1617
fi
18+
19+
# Show ORCA's own current build status. A failure may signify an upstream issue
20+
# or service level outage that could have affected this build.
21+
# @see https://travis-ci.org/acquia/orca/branches
22+
travis history --no-interactive --repo=acquia/orca --branch=master --limit=1 --date

bin/travis/before_install.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ composer global require \
4040
hirak/prestissimo \
4141
zaporylie/composer-drupal-optimizations
4242

43+
# Install Travis command line client.
44+
gem install travis
45+
4346
# Install ORCA.
4447
composer -d"$ORCA_ROOT" install
4548

bin/travis/script.sh

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,22 @@ case "$ORCA_JOB" in
2525
"DEPRECATED_CODE_SCAN") eval "orca qa:deprecated-code-scan --sut=$ORCA_SUT_NAME" ;;
2626
"DEPRECATED_CODE_SCAN_CONTRIB") eval "orca qa:deprecated-code-scan --contrib" ;;
2727
"ISOLATED_RECOMMENDED") eval "orca qa:automated-tests --sut=$ORCA_SUT_NAME --sut-only" ;;
28-
"INTEGRATED_RECOMMENDED") eval "orca qa:automated-tests --sut=$ORCA_SUT_NAME $SUT_ONLY" ;;
29-
"CORE_PREVIOUS") eval "orca qa:automated-tests --sut=$ORCA_SUT_NAME $SUT_ONLY" ;;
28+
"INTEGRATED_RECOMMENDED")
29+
eval "orca qa:automated-tests --sut=$ORCA_SUT_NAME $SUT_ONLY --phpunit"
30+
eval "orca qa:automated-tests --sut=$ORCA_SUT_NAME --sut-only --behat"
31+
;;
32+
"CORE_PREVIOUS")
33+
eval "orca qa:automated-tests --sut=$ORCA_SUT_NAME $SUT_ONLY --phpunit"
34+
eval "orca qa:automated-tests --sut=$ORCA_SUT_NAME --sut-only --behat"
35+
;;
3036
"ISOLATED_DEV") eval "orca qa:automated-tests --sut=$ORCA_SUT_NAME --sut-only" ;;
31-
"INTEGRATED_DEV") eval "orca qa:automated-tests --sut=$ORCA_SUT_NAME $SUT_ONLY" ;;
32-
"CORE_NEXT") eval "orca qa:automated-tests --sut=$ORCA_SUT_NAME $SUT_ONLY" ;;
37+
"INTEGRATED_DEV")
38+
eval "orca qa:automated-tests --sut=$ORCA_SUT_NAME $SUT_ONLY --phpunit"
39+
eval "orca qa:automated-tests --sut=$ORCA_SUT_NAME --sut-only --behat"
40+
;;
41+
"CORE_NEXT")
42+
eval "orca qa:automated-tests --sut=$ORCA_SUT_NAME $SUT_ONLY --phpunit"
43+
eval "orca qa:automated-tests --sut=$ORCA_SUT_NAME --sut-only --behat"
44+
;;
3345
"CUSTOM") eval "orca qa:automated-tests --sut=$ORCA_SUT_NAME ${ORCA_CUSTOM_TESTS_RUN_ARGS:=}" ;;
3446
esac

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
}
1111
],
1212
"require": {
13-
"php": ">=7.1",
13+
"php": ">=7.2",
1414
"ext-dom": "*",
1515
"ext-json": "*",
1616
"ext-sqlite3": "*",
@@ -62,7 +62,7 @@
6262
"pre-commit": [
6363
"set -e",
6464
"vendor/bin/parallel-lint --exclude vendor --no-progress .",
65-
"vendor/bin/phpcs --cache=var/.phpcs-cache"
65+
"vendor/bin/phpcs --cache=var/cache/phpcs.json"
6666
],
6767
"pre-push": "vendor/bin/phpcs",
6868
"post-install-cmd": "vendor/bin/cghooks add --ignore-lock",
@@ -88,7 +88,7 @@
8888
],
8989
"cghooks": "cghooks --ansi",
9090
"phpcbf": "phpcbf",
91-
"phpcs": "phpcs -s --cache=var/.phpcs-cache",
91+
"phpcs": "phpcs -s --cache=var/cache/phpcs.json",
9292
"phplint": "parallel-lint --exclude vendor --ignore-fails .",
9393
"phpmd": "phpmd . text phpmd.xml.dist --ignore-violations-on-exit",
9494
"phpunit": "phpunit"

composer.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1.0.0
1+
v1.1.0

config/packages.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,6 @@ drupal/cog:
7474
acquia/drupal-spec-tool:
7575
type: behat-extension
7676

77-
#drupal/lightning:
78-
# type: drupal-profile
79-
8077
drupal/lightning_api:
8178
core_matrix:
8279
8.7.x:
@@ -95,9 +92,6 @@ drupal/lightning_api:
9592
version: ~
9693
version_dev: ~
9794

98-
#acquia/lightning_commerce:
99-
# type: drupal-profile
100-
10195
drupal/lightning_core:
10296
core_matrix:
10397
8.7.x:

docs/getting-started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ For more information on using Behat with Drupal, see [the Behat website](http://
9898

9999
### Tagging/grouping
100100

101-
ORCA uses tags (for Behat) and groups (for PHPUnit) to determine which tests to run when, as depicted in the table below, where black indicates a test's being included and white indicates its being ignored:
101+
ORCA uses tags (for Behat) and groups (for PHPUnit) to determine which tests to run when, as depicted in the table below:
102102

103103
<!-- https://www.tablesgenerator.com/markdown_tables -->
104104

@@ -110,7 +110,7 @@ ORCA uses tags (for Behat) and groups (for PHPUnit) to determine which tests to
110110
111111
The default behavior is to run a test only when the package providing it is the SUT--not when it is merely included in another package's test fixture. Any test not designated public or ignored is so treated. Such tests are referred to as "private tests". This should be considered the correct choice for most tests--particularly for features that involve little or no risk of conflict with other Acquia packages, including [isolated unit tests](http://wiki.c2.com/?UnitTestIsolation) by definition.
112112

113-
Public tests (`orca_public`) are _always_ run, including when testing packages other than the one providing them. For example, a public test provided by Lightning API will also be run during tests of Acquia Commerce Manager, Acquia Lift, and the rest. Public tests thus lengthen builds for _all Acquia packages_ and should be used judiciously. Reserve them for high value features with meaningful risk of being broken by other packages, and make them as fast as possible.
113+
Public PHPUnit tests (`orca_public`) are _always_ run, including when testing packages other than the one providing them. (Behat has proved a source of too much instability to inflict across the board, so the default Travis CI jobs _never_ run non-SUT Behat tests.) For example, a public PHPUnit test provided by Lightning API will also be run during tests of Acquia Commerce Manager, Acquia Lift, and the rest. Public tests thus lengthen builds for _all Acquia packages_ and should be used judiciously. Reserve them for high value features with meaningful risk of being broken by other packages, and make them as fast as possible.
114114

115115
Ignored tests (`orca_ignore`) are "ignored" and _never_ run by ORCA. Tests should be ignored when they depend upon setup or preconditions that ORCA doesn't provide, such as a fixture with unique dependencies or a database populated by SQL dump. Once ignored, such tests can be scripted to run apart from ORCA after custom setup. In practice, it should rarely be necessary to ignore a test, as most setup and teardown can be accomplished through [Behat hooks](http://behat.org/en/latest/user_guide/context/hooks.html) and [PHPUnit template methods](https://phpunit.de/manual/6.5/en/fixtures.html).
116116

example/.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ cache:
3232
directories:
3333
- "$HOME/.composer/cache"
3434
- "$HOME/.drush/cache"
35+
- "$HOME/.rvm"
3536
- "${TMPDIR:-/tmp}/phpstan/cache"
3637

3738
env:

phpcs.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<description>PHP CodeSniffer configuration for analyzing packages with ORCA.</description>
99

1010
<arg name="colors"/>
11-
<arg name="cache" value="var/.phpcs-cache"/>
11+
<arg name="cache" value="var/cache/phpcs.json"/>
1212
<arg name="parallel" value="10"/>
1313

1414
<file>.</file>

src/Fixture/FixtureInspector.php

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Noodlehaus\Config;
77
use Noodlehaus\Parser\Json;
88
use Symfony\Component\Console\Helper\TableSeparator;
9+
use Symfony\Component\Console\Style\SymfonyStyle;
910

1011
/**
1112
* Creates a fixture.
@@ -40,6 +41,13 @@ class FixtureInspector {
4041
*/
4142
private $fixture;
4243

44+
/**
45+
* The output decorator.
46+
*
47+
* @var \Symfony\Component\Console\Style\SymfonyStyle
48+
*/
49+
private $output;
50+
4351
/**
4452
* The package manager.
4553
*
@@ -66,15 +74,18 @@ class FixtureInspector {
6674
*
6775
* @param \Acquia\Orca\Fixture\Fixture $fixture
6876
* The fixture.
77+
* @param \Symfony\Component\Console\Style\SymfonyStyle $output
78+
* The output decorator.
6979
* @param \Acquia\Orca\Fixture\PackageManager $package_manager
7080
* The package manager.
7181
* @param \Acquia\Orca\Utility\ProcessRunner $process_runner
7282
* The process runner.
7383
* @param \Acquia\Orca\Fixture\SubextensionManager $subextension_manager
7484
* The subextension manager.
7585
*/
76-
public function __construct(Fixture $fixture, PackageManager $package_manager, ProcessRunner $process_runner, SubextensionManager $subextension_manager) {
86+
public function __construct(Fixture $fixture, SymfonyStyle $output, PackageManager $package_manager, ProcessRunner $process_runner, SubextensionManager $subextension_manager) {
7787
$this->fixture = $fixture;
88+
$this->output = $output;
7889
$this->packageManager = $package_manager;
7990
$this->processRunner = $process_runner;
8091
$this->subextensionManager = $subextension_manager;
@@ -213,12 +224,12 @@ private function getPackageStabilitySetting(): string {
213224
* The field name.
214225
*
215226
* @return string
216-
* The field value.
227+
* The field value if available or an exclamation mark (!) if not.
217228
*/
218229
private function getDrushStatusField(string $field): string {
219230
$json = $this->getDrushStatusJson();
220231
if (!array_key_exists($field, $json) || !is_string($json[$field])) {
221-
return '~';
232+
return '!';
222233
}
223234
return $json[$field];
224235
}
@@ -248,6 +259,11 @@ private function getDrushStatusJson(): array {
248259

249260
$this->drushStatus = $data;
250261

262+
if (!is_array($this->drushStatus)) {
263+
$this->output->warning('Could not retrieve Drush status info. Some fixture details, denoted with an exclamation mark (!), are unavailable.');
264+
$this->drushStatus = [];
265+
}
266+
251267
return $this->drushStatus;
252268
}
253269

src/Task/DeprecatedCodeScanner/PhpStanTask.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class PhpStanTask {
1919

2020
use SutSettingsTrait;
2121

22-
public const JSON_LOG_PATH = 'var/phpstan.json';
22+
public const JSON_LOG_PATH = 'var/log/phpstan.json';
2323

2424
/**
2525
* The command array.

src/Task/StaticAnalysisTool/PhpCodeSnifferTask.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*/
1313
class PhpCodeSnifferTask extends TaskBase {
1414

15-
public const JSON_LOG_PATH = 'var/phpcs.json';
15+
public const JSON_LOG_PATH = 'var/log/phpcs.json';
1616

1717
/**
1818
* The status code.

src/Task/StaticAnalysisTool/PhpLocTask.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*/
1010
class PhpLocTask extends TaskBase {
1111

12-
public const JSON_LOG_PATH = 'var/phploc.json';
12+
public const JSON_LOG_PATH = 'var/log/phploc.json';
1313

1414
/**
1515
* {@inheritdoc}
File renamed without changes.

var/cache/.gitkeep

Whitespace-only changes.

var/log/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)