PHP Classes
elePHPant
Icontem

File: .travis.yml

Recommend this page to a friend!
  Classes of Filip Štamcar  >  PHPMailer Logging with Monolog  >  .travis.yml  >  Download  
File: .travis.yml
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHPMailer Logging with Monolog
Log email sent via PHPMailer using Monolog
Author: By
Last change:
Date: 5 months ago
Size: 1,203 bytes
 

Contents

Class file image Download
language: php

php:
  - 5.5
  - 5.6
  - 7.0
  - 7.1
  - 7.2
  - nightly

matrix:
  allow_failures:
    - php: hhvm
    - php: nightly
  fast_finish: true

cache:
  directories:
    - $HOME/.composer/cache

install:
  - travis_retry composer update --no-interaction --no-progress --no-suggest --prefer-dist
  - mkdir -p build/cov

script:
  # Test with Monolog 1.x
  - travis_retry composer require monolog/monolog:^1.0
  - vendor/bin/phpcs
  - vendor/bin/phpunit --coverage-php ./build/cov/monolog1.cov

  # Test with Monolog 2.x
  - |
    if [[ ${TRAVIS_PHP_VERSION:0:1} == "7" && ${TRAVIS_PHP_VERSION:2:1} != "0" ]]
    then
      travis_retry composer require monolog/monolog:^2.0@dev
      vendor/bin/phpcs
      vendor/bin/phpunit --coverage-php ./build/cov/monolog2.cov
    fi

after_script:
  # Merge coverage reports for tests with Monolog 1.x and 2.x
  - vendor/bin/phpcov merge --clover ./build/clover.xml ./build/cov

  # Upload coverage report when running PHP 7.2
  - |
    if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.2" ]]
    then
      travis_retry wget --no-verbose https://scrutinizer-ci.com/ocular.phar
      php ocular.phar code-coverage:upload --format=php-clover build/clover.xml
    fi