diff --git a/.travis.yml b/.travis.yml index 606e3ed..b750382 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 @@ -22,9 +23,29 @@ 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 @@ -32,21 +53,19 @@ mysql: 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