From 56e58cdaa99f4e471a4cf03a1ddf314178accd7f Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 27 Feb 2017 11:02:58 +0100 Subject: [PATCH 1/2] Add Coveralls --- .travis.yml | 11 +++++++- composer.json | 3 ++- composer.lock | 69 +++++++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 79 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index bf1d1f48..d17f4f69 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,6 +19,8 @@ matrix: - php: 7.0 - php: 7.1 - php: nightly + - php: 7.0 + env: COVERAGE=run allow_failures: - php: nightly @@ -34,7 +36,14 @@ before_script: - ./bin/console doctrine:schema:create --env=test - ./bin/console doctrine:fixtures:load --env=test -n - ./bin/rabbit vhost:mapping:create -p guest app/config/rabbit_vhost.yml + - if [ $COVERAGE = run ]; then PHPUNIT_FLAGS="--coverage-clover build/logs/clover.xml"; fi; script: - - ./bin/simple-phpunit -v + - ./bin/simple-phpunit -v $PHPUNIT_FLAGS - if [ "$CS_FIXER" = "run" ]; then php bin/php-cs-fixer fix --verbose --dry-run ; fi; + +after_success: + - | + if [ $COVERAGE = run ]; then + php bin/coveralls -v + fi diff --git a/composer.json b/composer.json index 47864a40..c20f7129 100644 --- a/composer.json +++ b/composer.json @@ -47,7 +47,8 @@ "friendsofphp/php-cs-fixer": "~2.0", "sensio/generator-bundle": "^3.0", "symfony/phpunit-bridge": "^3.0", - "doctrine/doctrine-fixtures-bundle": "^2.3" + "doctrine/doctrine-fixtures-bundle": "^2.3", + "satooshi/php-coveralls": "dev-master" }, "scripts": { "symfony-scripts": [ diff --git a/composer.lock b/composer.lock index 3a1cfbc8..3ef34941 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "bcfea0b3bd6eb47f82a37b0912698ac5", + "content-hash": "e99c559d70be6af17219439ac19bc462", "packages": [ { "name": "cache/adapter-common", @@ -4207,6 +4207,69 @@ ], "time": "2014-11-20T16:49:30+00:00" }, + { + "name": "satooshi/php-coveralls", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/satooshi/php-coveralls.git", + "reference": "d5124af8bd6464144d550906cce46bd0df78f428" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/satooshi/php-coveralls/zipball/d5124af8bd6464144d550906cce46bd0df78f428", + "reference": "d5124af8bd6464144d550906cce46bd0df78f428", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-simplexml": "*", + "guzzlehttp/guzzle": "^6.0", + "php": "^5.5 || ^7.0", + "psr/log": "^1.0", + "symfony/config": "^2.1 || ^3.0", + "symfony/console": "^2.1 || ^3.0", + "symfony/stopwatch": "^2.0 || ^3.0", + "symfony/yaml": "^2.0 || ^3.0" + }, + "suggest": { + "symfony/http-kernel": "Allows Symfony integration" + }, + "bin": [ + "bin/coveralls" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "Satooshi\\": "src/Satooshi/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kitamura Satoshi", + "email": "with.no.parachute@gmail.com", + "homepage": "https://www.facebook.com/satooshi.jp" + } + ], + "description": "PHP client library for Coveralls API", + "homepage": "https://github.com/satooshi/php-coveralls", + "keywords": [ + "ci", + "coverage", + "github", + "test" + ], + "time": "2017-02-25T12:14:18+00:00" + }, { "name": "sebastian/diff", "version": "1.4.1", @@ -4487,7 +4550,9 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "satooshi/php-coveralls": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { From 99fc5884fe5e9af2e6ac7c7ae736042aed5c4377 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 27 Feb 2017 11:08:55 +0100 Subject: [PATCH 2/2] Add badge in README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 90761819..704c0199 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Banditore [![Build Status](https://travis-ci.org/j0k3r/banditore.svg?branch=master)](https://travis-ci.org/j0k3r/banditore) +[![Coverage Status](https://coveralls.io/repos/github/j0k3r/banditore/badge.svg?branch=master)](https://coveralls.io/github/j0k3r/banditore?branch=master) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/j0k3r/banditore/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/j0k3r/banditore/?branch=master) ![Banditore](http://i.imgur.com/kAvg4w9.png)