widmogrod/php-algorithm-w

View on GitHub
.travis.yml

Summary

Maintainability
Test Coverage
language: php

dist: trusty

php:
 - 7.1
 - 7.2

matrix:
 include:
  - php: 7.1
    env: COVERAGE=yes

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

before_script:
 - composer self-update
 - if [[ $COVERAGE == yes ]]; then curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter; fi
 - if [[ $COVERAGE == yes ]]; then chmod +x ./cc-test-reporter; fi
 - if [[ $COVERAGE == yes ]]; then ./cc-test-reporter before-build; fi

install:
 - composer install --prefer-source

script:
 - if [[ $COVERAGE != yes ]]; then composer test; fi
 - if [[ $COVERAGE == yes ]]; then composer testc; fi
 - if [[ $COVERAGE == yes ]]; then composer check-code; fi

after_script:
 - if [[ $COVERAGE == yes ]]; then ./cc-test-reporter after-build --coverage-input-type clover --exit-code $TRAVIS_TEST_RESULT; fi

notifications:
 email: false