|
6 | 6 | directories:
|
7 | 7 | - "$HOME/.composer/cache"
|
8 | 8 | - "$HOME/.drush/cache"
|
9 |
| - - "$HOME/.npm" |
| 9 | + |
10 | 10 | php:
|
11 |
| - - 7.0 |
| 11 | + - 7.1 |
| 12 | + |
12 | 13 | env:
|
13 | 14 | - VERSION=HEAD
|
14 |
| - - VERSION=3.2.6 |
15 | 15 | # The final CI slot should be used to test the update path from the oldest
|
16 | 16 | # available database fixture.
|
17 | 17 | - VERSION=3.0.0
|
18 | 18 |
|
| 19 | +matrix: |
| 20 | + fast_finish: true |
| 21 | + |
19 | 22 | addons:
|
20 | 23 | chrome: stable
|
21 | 24 |
|
22 | 25 | before_install:
|
23 |
| - - phpenv config-rm xdebug.ini |
| 26 | + - phpenv config-add ./tests/travis.php.ini |
| 27 | + - phpenv rehash |
| 28 | + |
24 | 29 | - composer self-update
|
25 | 30 | - composer --version
|
26 | 31 | - google-chrome-stable --version
|
27 | 32 |
|
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 |
32 | 36 |
|
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" |
35 | 41 |
|
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 ./ |
44 | 49 |
|
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 |
52 | 56 |
|
53 | 57 | 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 |
61 | 60 |
|
62 | 61 | 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 |
67 | 63 |
|
68 | 64 | after_failure:
|
69 | 65 | - drush watchdog:show --count=100 --severity=Error --extended
|
70 |
| - |
71 |
| -matrix: |
72 |
| - fast_finish: true |
0 commit comments