Skip to content

Commit

Permalink
travis setup & readme
Browse files Browse the repository at this point in the history
  • Loading branch information
fprochazka committed Jun 3, 2017
1 parent 8b24d3c commit aea04ef
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
language: php

sudo: false

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

php:
- 7.1

env:
- # dev
- COMPOSER_EXTRA_ARGS="--prefer-stable"
- COMPOSER_EXTRA_ARGS="--prefer-lowest --prefer-stable"

matrix:
fast_finish: true
include:
- env: COMPOSER_EXTRA_ARGS="--prefer-stable" COVERAGE="--coverage-clover tests/coverage.xml"
allow_failures:
- env:

install:
- travis_retry composer update --no-interaction --no-suggest --no-progress --prefer-dist $COMPOSER_EXTRA_ARGS
- travis_retry composer create-project --no-interaction jakub-onderka/php-parallel-lint /tmp/php-parallel-lint
- if [ "$COVERAGE" != "" ]; then travis_retry wget -O /tmp/coveralls.phar https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar; fi

script:
- php vendor/bin/phpunit $COVERAGE -c tests/phpunit.xml
- php /tmp/php-parallel-lint/parallel-lint.php -e php,phpt --exclude vendor .
- php vendor/phpstan/phpstan-shim/phpstan.phar analyse --ansi --no-progress -l7 -c phpstan.neon src tests
- php vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 -sp src tests

after_script:
- if [ "$COVERAGE" != "" ]; then php /tmp/coveralls.phar --verbose --config tests/.coveralls.yml || true; fi
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Kdyby/DateTimeProviderBundle
===========

[![Build Status](https://secure.travis-ci.org/Kdyby/DateTimeProviderBundle.png?branch=master)](http://travis-ci.org/Kdyby/DateTimeProviderBundle)
[![Downloads this Month](https://img.shields.io/packagist/dm/kdyby/datetime-provider-bundle.svg)](https://packagist.org/packages/kdyby/datetime-provider-bundle)
[![Latest stable](https://img.shields.io/packagist/v/kdyby/datetime-provider-bundle.svg)](https://packagist.org/packages/kdyby/datetime-provider-bundle)
[![Coverage Status](https://coveralls.io/repos/github/Kdyby/DateTimeProviderBundle/badge.svg?branch=master)](https://coveralls.io/github/Kdyby/DateTimeProviderBundle?branch=master)

Installation
------------

The best way to install Kdyby/DateTimeProviderBundle is using [Composer](http://getcomposer.org/):

```sh
$ composer require kdyby/datetime-provider-bundle
```

Documentation
------------

Learn more in the [documentation](https://github.com/Kdyby/DateTimeProviderBundle/blob/master/docs/en/index.md).

-----

Homepage [http://www.kdyby.org](http://www.kdyby.org) and repository [http://github.com/Kdyby/DateTimeProviderBundle](http://github.com/Kdyby/DateTimeProviderBundle).
4 changes: 4 additions & 0 deletions tests/.coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# for php-coveralls
service_name: travis-ci
coverage_clover: tests/coverage.xml
json_path: coverage.json
7 changes: 7 additions & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

declare(strict_types = 1);

error_reporting(E_ALL);

require __DIR__ . '/../vendor/autoload.php';
25 changes: 25 additions & 0 deletions tests/phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0"?>
<phpunit
bootstrap="bootstrap.php"
colors="true"
backupGlobals="false"
backupStaticAttributes="false"
beStrictAboutChangesToGlobalState="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTestsThatDoNotTestAnything="true"
beStrictAboutTodoAnnotatedTests="true"
failOnRisky="true"
failOnWarning="true"
>
<testsuites>
<testsuite name="Kdyby Datetime Provider Bundle">
<directory suffix="Test.php">./</directory>
</testsuite>
</testsuites>

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

0 comments on commit aea04ef

Please sign in to comment.