language: php

php:
  - 7.1
  - 7.2
  - 7.3
  - 7.4snapshot
  - nightly

matrix:
  allow_failures:
  - php: 7.4snapshot
  - php: nightly

env:
  - COMPOSER_OPTS=""
  - COMPOSER_OPTS="--prefer-lowest"

before_script:
  - travis_retry composer update $COMPOSER_OPTS

script:
  - vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover

after_script:
  - wget https://scrutinizer-ci.com/ocular.phar
  - php ocular.phar code-coverage:upload --format=php-clover coverage.clover

group: travis_latest

language: php

php:
  - 7.1
  - 7.2
  - 7.3
  - 7.4snapshot
  - nightly

matrix:
  allow_failures:
  - php: 7.4snapshot
  - php: nightly

env:
  - COMPOSER_OPTS=""
  - COMPOSER_OPTS="--prefer-lowest"

before_script:
  - travis_retry composer update $COMPOSER_OPTS

script:
  - vendor/bin/phpunit

jobs:
  include:

    - stage: coverage
      script:
        - vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
        - wget https://scrutinizer-ci.com/ocular.phar
        - php ocular.phar code-coverage:upload --format=php-clover coverage.clover

group: travis_latest

Move the code coverage to a build stage
Move the code coverage to a build stage
