This repository has been archived by the owner on Jul 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.travis.yml
32 lines (32 loc) · 1.6 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
# Configuration for Travis CI at http://travis-ci.org/#!/reload/deployotron
language: php
php:
- 5.3
env:
- UNISH_DB_URL=mysql://root:@127.0.0.1 DRUSH_VERSION=5.10.0 PATCH="5.10.0...coverage-5.10.0"
- UNISH_DB_URL=mysql://root:@127.0.0.1 DRUSH_VERSION=6.2.0 PATCH="6.2.0...coverage-6.2.0"
install:
# Install Drush 6+ using composer.
- if ( test $DRUSH_VERSION != 5.10.0 ); then export PATH="$HOME/.composer/vendor/bin:$PATH"; fi
- if ( test $DRUSH_VERSION != 5.10.0 ); then composer global require drush/drush:$DRUSH_VERSION; fi
- if ( test $DRUSH_VERSION != 5.10.0 ); then export DRUSH_DIR=~/.composer/vendor/drush/drush; fi
# Install Drush 5 manually, as it's not installable using composer.
- if ( test $DRUSH_VERSION = 5.10.0 ); then export PATH="$HOME/drush:$PATH"; fi
- if ( test $DRUSH_VERSION = 5.10.0 ); then git clone https://github.com/drush-ops/drush.git ~/drush; fi
- if ( test $DRUSH_VERSION = 5.10.0 ); then cd ~/drush; git checkout $DRUSH_VERSION; cd -; fi
- if ( test $DRUSH_VERSION = 5.10.0 ); then export DRUSH_DIR=~/drush; fi
- cd $DRUSH_DIR
# Get and apply coverage collection patch.
- wget https://github.com/xendk/drush/compare/$PATCH.diff -O coverage.patch
- patch -p1 < coverage.patch
- phpenv rehash
- cd -
- mkdir cov
before_script:
- export BOOTSTRAP=$DRUSH_DIR/tests/drush_testcase.inc
script: phpunit --bootstrap=$BOOTSTRAP --coverage-clover=`pwd`/cov/clover.xml tests
notifications:
flowdock: 78b17a3314f1bac5207d8e65e391287b
after_script:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover cov/clover.xml