From ca2670d6719a97000c7a2d705d7cfd826c1e0301 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Fri, 7 Sep 2018 12:54:51 +0200 Subject: [PATCH] Enhancement: Require phpunit/phpunit and add basic Travis configuration --- .travis.yml | 32 ++++++++++++++++++++++++++++++++ README.md | 2 ++ composer.json | 4 +++- phpunit.xml | 21 +++++++++++++++++++++ 4 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 .travis.yml create mode 100644 phpunit.xml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..16b399c --- /dev/null +++ b/.travis.yml @@ -0,0 +1,32 @@ +language: php + +sudo: false + +php: + - 7.1 + - 7.2 + - master + +env: + matrix: + - DEPENDENCIES="high" + - DEPENDENCIES="low" + global: + - DEFAULT_COMPOSER_FLAGS="--no-interaction --no-ansi --no-progress --no-suggest" + +before_install: + - composer self-update + - composer clear-cache + +install: + - if [[ "$DEPENDENCIES" = 'high' ]]; then travis_retry composer update $DEFAULT_COMPOSER_FLAGS; fi + - if [[ "$DEPENDENCIES" = 'low' ]]; then travis_retry composer update $DEFAULT_COMPOSER_FLAGS --prefer-lowest; fi + +script: + - ./vendor/bin/phpunit --coverage-clover=coverage.xml + +after_success: + - bash <(curl -s https://codecov.io/bash) + +notifications: + email: false diff --git a/README.md b/README.md index 4dba003..3cbfdaa 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Build Status](https://travis-ci.org/sebastianbergmann/php-file-iterator.svg?branch=master)](https://travis-ci.org/sebastianbergmann/php-file-iterator) + # php-file-iterator ## Installation diff --git a/composer.json b/composer.json index 321272e..002e511 100644 --- a/composer.json +++ b/composer.json @@ -21,6 +21,9 @@ "require": { "php": "^7.1" }, + "require-dev": { + "phpunit/phpunit": "^7.1" + }, "autoload": { "classmap": [ "src/" @@ -32,4 +35,3 @@ } } } - diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 index 0000000..3e12be4 --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,21 @@ + + + + + tests + + + + + + src + + +