Skip to content
This repository was archived by the owner on Nov 16, 2021. It is now read-only.

Commit 3fd6437

Browse files
author
Adam Hoenich
committed
Test against a fully integrated ORCA fixture.
1 parent ab0077b commit 3fd6437

25 files changed

+265
-284
lines changed

.travis.yml

Lines changed: 32 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -6,67 +6,60 @@ cache:
66
directories:
77
- "$HOME/.composer/cache"
88
- "$HOME/.drush/cache"
9-
- "$HOME/.npm"
9+
1010
php:
11-
- 7.0
11+
- 7.1
12+
1213
env:
1314
- VERSION=HEAD
14-
- VERSION=3.2.6
1515
# The final CI slot should be used to test the update path from the oldest
1616
# available database fixture.
1717
- VERSION=3.0.0
1818

19+
matrix:
20+
fast_finish: true
21+
1922
addons:
2023
chrome: stable
2124

2225
before_install:
23-
- phpenv config-rm xdebug.ini
26+
- phpenv config-add ./tests/travis.php.ini
27+
- phpenv rehash
28+
2429
- composer self-update
2530
- composer --version
2631
- google-chrome-stable --version
2732

28-
install:
29-
# Add Composer's local bin directory to the PATH so that we will be running
30-
# our installed versions of Drush, PHPCS, Behat, PhantomJS, etc.
31-
- export PATH="$HOME/.composer/vendor/bin:$TRAVIS_BUILD_DIR/vendor/bin:$PATH"
33+
- export ORCA=$TRAVIS_BUILD_DIR/../orca
34+
- export ORCA_FIXTURE=$ORCA-build
35+
- export ORCA_SUT=$TRAVIS_REPO_SLUG
3236

33-
# composer install should fail on bad patches.
34-
- export COMPOSER_EXIT_ON_PATCH_FAILURE=1
37+
- export PATH="$HOME/.composer/vendor/bin:$PATH"
38+
- export PATH="$ORCA/bin:$PATH"
39+
- export PATH="$ORCA/vendor/bin:$PATH"
40+
- export PATH="$ORCA_FIXTURE/vendor/bin:$PATH"
3541

36-
# Install the PECL YAML extension for strict parsing. yes is used to
37-
# acknowledge all prompts.
38-
- yes '' | pecl install yaml
39-
# Tweak PHP configuration.
40-
- echo 'max_execution_time = 120' >> drupal.php.ini;
41-
- echo 'sendmail_path = /bin/true' >> drupal.php.ini;
42-
- phpenv config-add drupal.php.ini
43-
- phpenv rehash
42+
install:
43+
# Install ORCA so that we can build the fixture using that.
44+
- git clone --depth 1 --branch lightning https://github.com/acquia/orca.git ../orca
45+
- "$ORCA/bin/travis/install 8.x-3.x"
46+
47+
# Run ORCA static analysis tools.
48+
- orca static-analysis:run ./
4449

45-
# Build the Lightning code base with the latest dependencies.
46-
- composer update
47-
# Install Lightning cleanly so that settings.php will be created properly.
48-
- lightning install --from-config 'sqlite\://db.sqlite' lightning 'http://127.0.0.1:8080'
49-
# Restore and update from the previous version.
50-
- lightning update $VERSION
51-
- drush cache:rebuild
50+
# Use ORCA to build the code base.
51+
- orca fixture:init -f --sut $ORCA_SUT --dev --profile lightning
52+
# Install dev dependencies.
53+
- composer require --dev drupal/console --working-dir $ORCA_FIXTURE --no-update
54+
# Update in a separate step to prevent lock file version conflicts.
55+
- composer update --working-dir $ORCA_FIXTURE
5256

5357
before_script:
54-
- drush config:set system.date timezone.default $TZ --yes
55-
- drush runserver --default-server=builtin 8080 &>/dev/null &
56-
# Disable the History module during testing, to prevent weird deadlock errors that don't
57-
# actually affect anything.
58-
- drush pm-uninstall --yes history
59-
- chromedriver --port=4444 &
60-
- cp -f phpunit.xml ./docroot/core
58+
- cd $ORCA_FIXTURE/docroot
59+
- $TRAVIS_BUILD_DIR/update.sh $VERSION
6160

6261
script:
63-
- composer validate composer.json --no-check-all --ansi --no-interaction
64-
- behat --stop-on-failure
65-
- cd docroot
66-
- phpunit --configuration ./core --group lightning,profiles
62+
- orca tests:run --sut $ORCA_SUT
6763

6864
after_failure:
6965
- drush watchdog:show --count=100 --severity=Error --extended
70-
71-
matrix:
72-
fast_finish: true

behat.yml

Lines changed: 6 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,20 @@
1+
imports:
2+
- 'docroot/modules/contrib/lightning_core/tests/mink.behat.yml'
3+
14
default:
25
suites:
36
default:
47
paths:
5-
- 'docroot/profiles/contrib/lightning/tests/features'
6-
- 'docroot/modules/contrib/lightning_api/tests/features'
7-
- 'docroot/modules/contrib/lightning_core/tests/features'
8-
- 'docroot/modules/contrib/lightning_media/tests/features'
9-
- 'docroot/modules/contrib/lightning_media/modules/lightning_media_slideshow/tests/features'
10-
- 'docroot/modules/contrib/lightning_workflow/tests/features'
11-
- 'docroot/modules/contrib/lightning_workflow/modules/lightning_scheduler/tests/features'
12-
- 'docroot/modules/contrib/lightning_layout/tests/features'
8+
- 'tests/features'
139
contexts:
1410
- '\Drupal\DrupalExtension\Context\DrupalContext'
1511
- '\Drupal\DrupalExtension\Context\MinkContext'
16-
- '\Drupal\DrupalExtension\Context\MessageContext'
17-
- '\Drupal\DrupalExtension\Context\DrushContext'
18-
- '\Drupal\Tests\lightning_media\FixtureContext'
19-
- '\Drupal\Tests\lightning_core\FixtureContext'
20-
- '\Drupal\Tests\lightning_layout\FixtureContext'
21-
- '\Drupal\Tests\lightning_api\FixtureContext'
22-
- '\Drupal\Tests\lightning_workflow\FixtureContext'
2312
extensions:
2413
Drupal\DrupalExtension:
2514
subcontexts:
2615
paths:
27-
- 'profiles/contrib/lightning/tests/features/bootstrap'
28-
- 'modules/contrib/lightning_core/tests/contexts'
29-
- 'modules/contrib/lightning_media/tests/contexts'
30-
- 'modules/contrib/lightning_workflow/tests/contexts'
31-
- 'modules/contrib/lightning_workflow/modules/lightning_scheduler/tests/contexts'
32-
- 'modules/contrib/lightning_layout/tests/contexts'
16+
- 'profiles/contrib'
17+
- 'modules/contrib'
3318
api_driver: drupal
3419
blackbox: null
3520
drupal:
@@ -40,18 +25,3 @@ default:
4025
error_message_selector: '.messages [role="alert"]'
4126
warning_message_selector: .messages--warning
4227
login_form_selector: '#user-login-form'
43-
Behat\MinkExtension:
44-
browser_name: chrome
45-
base_url: 'http://127.0.0.1:8080'
46-
goutte: null
47-
selenium2:
48-
wd_host: 'http://127.0.0.1:4444'
49-
capabilities:
50-
chrome:
51-
switches:
52-
- headless
53-
- disable-gpu
54-
- no-sandbox
55-
- disable-dev-shm-usage
56-
- disable-extensions
57-
browser: chrome

0 commit comments

Comments
 (0)