forked from lemberg/draft-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
58 lines (49 loc) · 1.89 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
58
sudo: required
dist: trusty
language: php
cache:
apt: true
directories:
- "$HOME/.composer/cache"
- "$HOME/.drush/cache"
php:
- 7.1
- 7.2
before_install:
- phpenv config-rm xdebug.ini
- composer self-update
- composer --version
# Download and register Oracle VirtualBox keys
- wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
- wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
# Add Oracle VirtualBox repository
- sudo add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian trusty contrib"
# Update apt-get
- sudo apt-get update -qq
# Install Linux headers
- sudo apt-get -y --force-yes install linux-headers-`uname -r`
# Install VirtualBox 5.2
- sudo apt-get install virtualbox-5.2
# Install Vagrant 2.0.1
# Todo: install from a package repository, not from a hardcoded URL.
- curl -O https://releases.hashicorp.com/vagrant/2.0.1/vagrant_2.0.1_x86_64.deb
- sudo dpkg -i vagrant_2.0.1_x86_64.deb
install:
# Add Composer's local bin directory to the PATH.
- export PATH="$HOME/.composer/vendor/bin:$TRAVIS_BUILD_DIR/bin:$PATH"
# composer install should fail on bad patches.
- export COMPOSER_EXIT_ON_PATCH_FAILURE=1
# Create the MySQL database and add a user for testing.
- mysql -u root -e "CREATE DATABASE drupal; CREATE USER 'draft'@'localhost' IDENTIFIED BY 'draft'; GRANT ALL ON drupal.* TO 'draft'@'localhost';"
# Tweak PHP configuration.
- echo 'sendmail_path = /bin/true' >> drupal.php.ini;
- phpenv config-add drupal.php.ini
- phpenv rehash
# Build the code base.
- composer create-project --no-progress --no-interaction
script:
- composer validate --no-check-all --ansi
- vagrant status
- drush site-install --db-url=mysql://draft:draft@localhost/drupal --account-name=admin --account-pass=admin -r ./docroot --yes
matrix:
fast_finish: true