Skip to content

Commit

Permalink
Enhancement: Require phpunit/phpunit and add basic Travis configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz authored and sebastianbergmann committed Sep 7, 2018
1 parent b931e55 commit ca2670d
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .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
2 changes: 2 additions & 0 deletions 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
Expand Down
4 changes: 3 additions & 1 deletion composer.json
Expand Up @@ -21,6 +21,9 @@
"require": {
"php": "^7.1"
},
"require-dev": {
"phpunit/phpunit": "^7.1"
},
"autoload": {
"classmap": [
"src/"
Expand All @@ -32,4 +35,3 @@
}
}
}

21 changes: 21 additions & 0 deletions phpunit.xml
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/7.2/phpunit.xsd"
bootstrap="vendor/autoload.php"
forceCoversAnnotation="true"
beStrictAboutCoversAnnotation="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTodoAnnotatedTests="true"
verbose="true">
<testsuites>
<testsuite name="default">
<directory suffix="Test.php">tests</directory>
</testsuite>
</testsuites>

<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src</directory>
</whitelist>
</filter>
</phpunit>

0 comments on commit ca2670d

Please sign in to comment.