This repository has been archived by the owner on Oct 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
57 lines (48 loc) · 1.53 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
51
52
53
54
55
56
57
---
version: ~> 1.0
branches:
only:
- /^\d+\.x\.x$/
- /^\d+\.\d+\.\d+[-a-z0-9]*$/
os: linux
dist: xenial
services:
- mysql
cache:
directories:
- "$HOME/.composer/cache"
- "$HOME/.drush/cache"
language: php
jobs:
fast_finish: true
include:
- php: 7.2
env: DRUPAL_CORE=^8.8
- php: 7.3
env: DRUPAL_CORE=^8.9
- php: 7.4
env: DRUPAL_CORE=^8.9
- php: 7.3
env: DRUPAL_CORE=^9.0
- php: 7.4
env: DRUPAL_CORE=^9.0
before_install:
# Tweak PHP configuration.
- phpenv config-rm xdebug.ini
- echo 'sendmail_path = /bin/true' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
# Create the MySQL database and add a user for testing.
- mysql -u root -e "CREATE DATABASE drupal; CREATE USER 'drupal'@'localhost' IDENTIFIED BY 'drupal'; GRANT ALL ON drupal.* TO 'drupal'@'localhost';"
install:
# Get back to the home directory.
- cd $TRAVIS_HOME
# Create a new Drupal project using the recommended-project template.
- composer create-project drupal/recommended-project:$DRUPAL_CORE project
- cd project
- composer config repositories.draft path $TRAVIS_BUILD_DIR
- composer config extra.composer-exit-on-patch-failure true
- composer config extra.enable-patching true
- composer require zaporylie/composer-drupal-optimizations:^1.1 --dev
- composer require drush/drush:^10
- composer require lemberg/draft @dev
script:
- ./vendor/bin/drush site:install draft --db-url=mysql://drupal:drupal@localhost/drupal --account-name=admin --account-pass=admin --root ./web --yes