Skip to content

Commit

Permalink
First test of travis with drupal_ti
Browse files Browse the repository at this point in the history
  • Loading branch information
LionsAd committed Nov 29, 2014
1 parent 40f834b commit b4ab9f7
Showing 1 changed file with 31 additions and 12 deletions.
43 changes: 31 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# .travis.yml - File for Travis CI
# @file
# .travis.yml - Drupal for Travis CI Integration
#
# Based for simpletest upon:
# https://github.com/sonnym/travis-ci-drupal-module-example
Expand All @@ -22,31 +23,49 @@ env:
# add composer's global bin directory to the path
# see: https://github.com/drush-ops/drush#install---composer
- PATH="$PATH:$HOME/.composer/vendor/bin"

# Drupal specific vars.
- DRUPAL_TI_MODULE_NAME="service_container"
- DRUPAL_TI_DB="drupal_travis_db"
- DRUPAL_TI_DB_URL="mysql://root:@127.0.0.1/drupal_travis_db"
# Note: Do not add a trailing slash here.
- DRUPAL_TI_WEBSERVER_URL="http://127.0.0.1"
- DRUPAL_TI_WEBSERVER_PORT="8080"

# Simpletest specific commandline arguments.
- DRUPAL_TI_SIMPLETEST_ARGS="--verbose --color --concurrency 4 --url $DRUPAL_TI_WEBSERVER_URL:$DRUPAL_TI_WEBSERVER_PORT $DRUPAL_TI_MODULE_NAME"

# PHPUnit specific commandline arguments.
- DRUPAL_TI_PHPUNIT_ARGS=""

# Code coverage via coveralls.io
- DRUPAL_TI_COVERAGE="satooshi/php-coveralls:0.6.*"
# This needs to match your .coveralls.yml file.
- DRUPAL_TI_COVERAGE_FILE="build/logs/clover.xml"

matrix:
- IGNORE_DRUPAL_TRAVIS_INTEGRATION=""
- IGNORE_DRUPAL_TRAVIS_INTEGRATION="yes"
- DRUPAL_TI_RUNNERS="phpunit"
- DRUPAL_TI_RUNNERS="phpunit simpletest"

mysql:
database: drupal_travis_db
username: root
encoding: utf8

install:
- ./tests/install.sh
- ./tests/drupal-travis-integration/install.sh
- cd ./tests
# - composer global require LionsAd/drupal_ti:1.*
- ln -s $(pwd)/drupal_ti/drupal-ti "$HOME/.composer/vendor/bin"
- drupal-ti install

before_script:
- mkdir -p ./tests/build/logs
# Install drupal and run web server: $module_name $db_name $db_url
- ./tests/drupal-travis-integration/before-script.sh "service_container" "drupal_travis_db" "mysql://root:@127.0.0.1/drupal_travis_db"
- drupal-ti before-script

script:
- ./tests/run-tests.sh --coverage-clover build/logs/clover.xml
- ./tests/drupal-travis-integration/run-simpletests.sh --verbose --color --concurrency 4 --php $(which php) --url "http://127.0.0.1:8080" "service_container"
- drupal-ti script

after_script:
- cd ./tests
- php vendor/bin/coveralls -v
- drupal-ti after-script

notifications:
email: false
Expand Down

0 comments on commit b4ab9f7

Please sign in to comment.