phpmetrics / PhpMetrics

Beautiful and understandable static analysis tool for PHP
https://phpmetrics.github.io/website/
MIT License
2.48k stars 259 forks source link

Way to improve travis build #214

Closed Halleck45 closed 7 years ago

Halleck45 commented 8 years ago

It should be nice to improve the travis-ci build as described in #197:

Here is an example. The goal consists in testing both symfony 2.5 and symfony 3, for each version of PHP:

language: php

sudo: false

php:
  - '5.5'
  - '7.0'
  - nightly
  - hhvm

matrix:
  fast_finish: true
  include:
    - php: '5.4'
      env: COMPOSER_FLAGS="--prefer-lowest"
      env: SYMFONY_VERSION=2.3.*
    - php: '5.6'
      env: SYMFONY_VERSION=2.3.*
    - php: '5.6'
      env: SYMFONY_VERSION=2.7.*
    - php: '5.6'
      env: SYMFONY_VERSION=2.8.*
    - php: '5.6'
      env: SYMFONY_VERSION=3.0.*
    - php: '5.6'
      env: SYMFONY_VERSION="3.1.*@dev"
  allow_failures:
    - php: '7.0'
    - php: nightly
    - php: hhvm
    - env: SYMFONY_VERSION="3.1.*@dev"

services:
  - mongodb
  - mysql

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

before_install:
  - composer self-update
  - if [ "$SYMFONY_VERSION" != "" ]; then composer require "symfony/symfony:${SYMFONY_VERSION}" --no-update; fi;
  - echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini

install:
  - if ([ "hhvm" != "$TRAVIS_PHP_VERSION" ] && [ "nightly" != "$TRAVIS_PHP_VERSION" ]); then wget https://scrutinizer-ci.com/ocular.phar; fi;
  - composer update --prefer-dist --no-interaction $COMPOSER_FLAGS

script: make test

after_script:
  - if ([ "hhvm" != "$TRAVIS_PHP_VERSION" ] && [ "nightly" != "$TRAVIS_PHP_VERSION" ]); then php ocular.phar code-coverage:upload --format=php-clover coverage.xml; fi;

notifications:
  email: false
Halleck45 commented 7 years ago

outdated