Skip to content

Commit

Permalink
Merge pull request #78 from moreonion/more-ci
Browse files Browse the repository at this point in the history
Improve CI
  • Loading branch information
torotil committed Dec 20, 2017
2 parents db31db5 + 2ce22ed commit b228071
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
15 changes: 9 additions & 6 deletions .travis.yml
Expand Up @@ -16,21 +16,24 @@ cache:

install:
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- composer global require drush/drush:6.* 'phpunit/phpunit=5.6.*'
- composer global require drush/drush:8.1.*

before_script:
- repo=`pwd`
- cd ..
- git clone https://github.com/torotil/upal.git
- upal=`pwd`/upal
- mysql -e 'create database drupal'
- php -d sendmail_path=`which true` ~/.composer/vendor/bin/drush.php --yes core-quick-drupal --profile=testing --no-server --db-url=mysql://root:@127.0.0.1/drupal test-root
- ln -s $repo test-root/drupal/sites/all/modules/campaignion
- cd test-root/drupal
- php -d include_path=`pwd` -d sendmail_path=`which true` ~/.composer/vendor/bin/drush.php --yes core-quick-drupal --core=drupal-7.x --profile=testing --no-server --db-url=mysql://root:@127.0.0.1/drupal --root=`pwd`/test-root
- ln -s $repo test-root/sites/all/modules/campaignion
- cd test-root
- root=`pwd`
- drush dl addressfield ctools date entity features field_type_language i18n little_helpers psr0 redhen webform webform_confirm_email webform_template ultimate_cron-7.x-2.x
- drush dl addressfield ctools date entity features field_type_language form_builder i18n little_helpers oowizard paypal_payment psr0 redhen webform webform_confirm_email webform_template ultimate_cron
- drush --yes pm-enable campaignion_test

script:
- cd $repo
- UPAL_ROOT=$root UPAL_DB_URL=mysql://root:@127.0.0.1/drupal UPAL_WEB_URL=http://127.0.0.1 ~/.composer/vendor/bin/phpunit -c phpunit.xml --bootstrap $upal/bootstrap.php .
- UPAL_ROOT=$root UPAL_DB_URL=mysql://root:@127.0.0.1/drupal UPAL_WEB_URL=http://127.0.0.1 phpunit -c phpunit.xml --bootstrap $upal/bootstrap.php --coverage-clover=coverage.xml .

after_success:
- bash <(curl -s https://codecov.io/bash)
11 changes: 0 additions & 11 deletions campaignion_newsletters/campaignion_newsletters.api.php
Expand Up @@ -33,14 +33,3 @@ function hook_campaignion_newsletters_subscription_presave(Subscription $subscri
*/
function hook_campaignion_newsletters_subscription_saved(Subscription $subscription, $from_provider, $was_new) {
}

/**
* React to a newsletter subscription being deleted.
*
* @param \Drupal\campaignion_newsletters\Subscription $subscription
* The subscription that was delted from the database.
* @param bool $from_provider
* TRUE if the change was initiated by the newsletter provider.
*/
function hook_campaignion_newsletters_subscription_saved(Subscription $subscription, $from_provider) {
}
3 changes: 3 additions & 0 deletions campaignion_test/campaignion_test.info
Expand Up @@ -16,9 +16,12 @@ dependencies[] = date
dependencies[] = entity
dependencies[] = features
dependencies[] = field_type_language
dependencies[] = form_builder_webform
dependencies[] = i18n_taxonomy
dependencies[] = list
dependencies[] = options
dependencies[] = paypal_payment_ec
dependencies[] = paypal_payment_pps
dependencies[] = redhen_contact
dependencies[] = redhen_fields
dependencies[] = taxonomy
Expand Down
6 changes: 6 additions & 0 deletions phpunit.xml
Expand Up @@ -22,7 +22,13 @@
<directory suffix=".install">.</directory>
<exclude>
<directory suffix="Test.php">.</directory>
<directory suffix=".api.php">.</directory>
<directory suffix=".tpl.php">.</directory>
<directory suffix=".features.inc">.</directory>
<directory suffix=".features.field_base.inc">.</directory>
<directory suffix=".features.field_instance.inc">.</directory>
<directory suffix=".features.taxonomy.inc">.</directory>
<directory suffix=".features.uuid_term.inc">.</directory>
</exclude>
</whitelist>
</filter>
Expand Down

0 comments on commit b228071

Please sign in to comment.