Chiliec/yii2-vote

View on GitHub
.travis.yml

Summary

Maintainability
Test Coverage
language: php

php:
    - 5.4
    - 7.1
    - nightly

matrix:
  allow_failures:
    - php: nightly

sudo: false

before_install:
    - composer config -g github-oauth.github.com "$GITHUB_TOKEN"
    - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
    - chmod +x ./cc-test-reporter
    - ./cc-test-reporter before-build

install:
    - composer global require "fxp/composer-asset-plugin:^1.2.0"
    - composer global require "codeception/codeception:*"
    - export PATH="$HOME/.composer/vendor/bin:$PATH"
    - composer update

script:
    - codecept run unit --coverage --coverage-xml --fail-fast

after_script:
    - cp "$TRAVIS_BUILD_DIR"/tests/_output/coverage.xml "$TRAVIS_BUILD_DIR"/clover.xml
    - if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --coverage-input-type=clover --exit-code $TRAVIS_TEST_RESULT; fi