forked from drupal-composer/drupal-project
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.travis.yml
50 lines (44 loc) · 2.19 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
language: php
dist: bionic
sudo: false
php:
- 7.2
- 7.3
matrix:
fast_finish: true
allow_failures:
- php: 7.2
env: RELEASE=stable COMPOSER_CHANNEL=snapshot
- php: 7.3
env: RELEASE=stable COMPOSER_CHANNEL=snapshot
env:
global:
- SIMPLETEST_DB=sqlite://tmp/site.sqlite
- SIMPLETEST_BASE_URL="http://127.0.0.1:8080"
matrix:
- RELEASE=stable COMPOSER_CHANNEL=stable
- RELEASE=dev COMPOSER_CHANNEL=stable
- RELEASE=stable COMPOSER_CHANNEL=snapshot
before_install:
# https://www.drupal.org/project/drupal/issues/3107155
- sudo echo "deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse" >> /etc/apt/sources.list
- sudo apt-get update
- sudo apt-get -y install sqlite3/focal
- echo 'sendmail_path = /bin/true' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- phpenv config-rm xdebug.ini
- export COMPOSER_PATH="/home/travis/.phpenv/versions/$TRAVIS_PHP_VERSION/bin/composer"
- COMPOSER_MEMORY_LIMIT=-1 php -d memory_limit=-1 $COMPOSER_PATH --verbose self-update --$COMPOSER_CHANNEL
- COMPOSER_MEMORY_LIMIT=-1 php -d memory_limit=-1 $COMPOSER_PATH --version
install:
- COMPOSER_MEMORY_LIMIT=-1 php -d memory_limit=-1 $COMPOSER_PATH --verbose validate
- COMPOSER_MEMORY_LIMIT=-1 php -d memory_limit=-1 $COMPOSER_PATH --verbose install
script:
- if [[ $RELEASE = dev ]]; then COMPOSER_MEMORY_LIMIT=-1 php -d memory_limit=-1 $COMPOSER_PATH --verbose remove --no-update drupal/console; fi;
- if [[ $RELEASE = dev ]]; then COMPOSER_MEMORY_LIMIT=-1 php -d memory_limit=-1 $COMPOSER_PATH --verbose require --no-update drupal/core:8.8.x-dev; composer --verbose require --no-update --dev drupal/core-dev:8.8.x-dev; fi;
- if [[ $RELEASE = dev ]]; then COMPOSER_MEMORY_LIMIT=-1 php -d memory_limit=-1 $COMPOSER_PATH --verbose update; fi;
- ./vendor/bin/drush site-install --verbose --yes --db-url=sqlite://tmp/site.sqlite
- ./vendor/bin/drush runserver $SIMPLETEST_BASE_URL &
- until curl -s $SIMPLETEST_BASE_URL; do true; done > /dev/null
# Run a single unit test to verfiy the testing setup.
- ./vendor/bin/phpunit -c ./web/core ./web/core/modules/system/tests/src/Unit/SystemRequirementsTest.php
- ./vendor/bin/drush