chippyash/Strong-Type

View on GitHub
.travis.yml

Summary

Maintainability
Test Coverage
# see http://about.travis-ci.org/docs/user/languages/php/ for more hints
language: php

# list any PHP version you want to test against
php:
  # aliased to a recent 5.6.x version
  - 5.6
  # aliased to a recent 7.x version
  - 7
  # hhvm
  #- hhvm

before_install:
  - sudo apt-get update > /dev/null
  - PHPVER=$(php -v | grep  -P --only-matching "\\d+\.\\d+" | head -n 1)
  - if [ 5.6 = $PHPVER ]; then UNITCFG="phpunit56.travis.xml"; else UNITCFG="phpunit.travis.xml"; fi

install:
  - if [ 5.6 = $PHPVER ]; then sudo apt-get install -y --force-yes php5-gmp;fi

# omitting "script:" will default to phpunit
# use the $DB env variable to determine the phpunit.xml to use
before_script:
  # - echo "extension = gmp.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
  - composer install --no-interaction
  - mkdir -p build/logs
  - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
  - chmod +x ./cc-test-reporter
  - if [ 5.6 = $PHPVER ]; then ./cc-test-reporter before-build; fi

script:
  - vendor/phpunit/phpunit/phpunit --configuration ./$UNITCFG test

after_success:
  - if [ 5.6 = $PHPVER ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi

# configure notifications (email, IRC, campfire etc)
notifications:
  email: "ashley@zf4.biz"