forked from droptica/codeception-drupal-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
54 lines (44 loc) · 1.68 KB
/
.travis.yml
File metadata and controls
54 lines (44 loc) · 1.68 KB
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
####
# Travis configuration for codeception-drupal-module.
####
language: php
php:
- 5.4
- 5.5
- 5.6
env:
- CODECEPTION_VERSION="2.0.*" DRUPAL_VERSION="drupal-7.x"
- CODECEPTION_VERSION="2.1.*" DRUPAL_VERSION="drupal-7.x"
mysql:
database: travis_drupal
user: root
encoding: utf8
before_install:
- sudo apt-get update -qq > /dev/null
- sudo apt-get install -y -qq postfix
- composer self-update
# Set up the directory we're going to need during install.
- sudo mkdir -p /var/www
- sudo chown travis:travis /var/www
install:
# Setup fake mailserver - Thanks to http://dropbucket.org/node/1761
- sudo service postfix stop
- smtp-sink -d "%d.%H.%M.%S" localhost:2500 1000 &
- echo -e '#!/usr/bin/env bash\nexit 0' | sudo tee /usr/sbin/sendmail
- echo 'sendmail_path = "/usr/sbin/sendmail -t -i "' | sudo tee "/home/travis/.phpenv/versions/`php -i | grep "PHP Version" | head -n 1 | grep -o -P '\d+\.\d+\.\d+.*'`/etc/conf.d/sendmail.ini"
# Install Drush globally.
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- composer global require drush/drush:6.*
# Get a specific version of Codeception and then install Composer dependencies.
- composer require codeception/codeception:${CODECEPTION_VERSION}
- composer install
# Download Drupal and get it up and running.
- drush dl ${DRUPAL_VERSION} --destination=/var/www --drupal-project-rename=drupal
- drush site-install -y --db-url=mysql://root@localhost/travis_drupal --db-su='root' --db-su-pw='' -r /var/www/drupal
before_script:
# Prepare Codeception to run.
- vendor/bin/codecept build
script:
- vendor/bin/codecept run --coverage --coverage-xml --env=travis
after_script:
- vendor/bin/coveralls