elboletaire/Watimage

View on GitHub
.travis.yml

Summary

Maintainability
Test Coverage
language: php
php:
- 5.4
- 5.5
- 5.6
- 7.0

env:
  global:
  - DEFAULT=1
  - secure: YIIpFV5hgzQf8uUzbb8KdS2u7gOh80i0tVJbg+nRAVLF83tF2fA7wMFFSTpTUGAJyaoQQt40pkCPqLTUAR1hj/P0EltAdeSSlKRy3od9z668wW/9SemZHhpxQ3kDHEHT4xetzsw9o5T3xvHCH3pRh8dPa23arhvJ60X0URW+KyU=

matrix:
  include:
  - php: 5.6
    env: PHPCS=1 DEFAULT=0
  - php: 5.6
    env: COVERALLS=1 DEFAULT=0

install:
- composer self-update
- composer install --prefer-dist --no-interaction --dev

before_script:
- sh -c "if [ '$COVERALLS' = '1' ]; then composer require --dev satooshi/php-coveralls:dev-master; fi"
- sh -c "if [ '$COVERALLS' = '1' ]; then mkdir -p build/logs; fi"

script:
- sh -c "if [ '$DEFAULT' = '1' ]; then phpunit -d memory_limit=512M; fi"
- sh -c "if [ '$PHPCS' = '1' ]; then ./vendor/bin/phpcs -p --extensions=php --standard=psr1,psr2 ./src; fi"
- sh -c "if [ '$COVERALLS' = '1' ]; then phpunit -d memory_limit=512M --coverage-clover build/logs/clover.xml; fi"
- sh -c "if [ '$COVERALLS' = '1' ]; then vendor/bin/coveralls -c .coveralls.yml -v; fi"

after_success:
- "if  [ $TRAVIS_PHP_VERSION = '5.6' ] && [ $TRAVIS_BRANCH = 'master' ] && [ $TRAVIS_PULL_REQUEST = 'false' ]; then sh generate-api.sh; fi"