From 4b33fec5aeafa3906534beb13000aaac0b841e65 Mon Sep 17 00:00:00 2001 From: Damien Debin Date: Fri, 13 Sep 2019 13:20:20 +0200 Subject: [PATCH] Add Codecov. --- .gitignore | 5 +++-- .travis.yml | 12 ++++++++++-- README.md | 6 +++++- composer.json | 2 ++ composer.lock | 6 ++++-- 5 files changed, 24 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 547ee51..2e8da0e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,6 @@ **/.idea/dataSources.local.xml **/.idea/dictionaries /vendor/ -.php_cs.cache -/tests-report-html/ \ No newline at end of file +/.php_cs.cache +/tests-report-html/ +/coverage.xml \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index acda4ef..508fac6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,17 +1,25 @@ language: php + cache: directories: - $HOME/.composer + sudo: false + matrix: fast_finish: true include: - php: '7.1' - php: '7.2' - php: '7.3' + install: - travis_retry composer install --no-progress --no-interaction --prefer-dist + script: - ./vendor/bin/php-cs-fixer fix --allow-risky=yes --dry-run -v --stop-on-violation - - ./vendor/bin/phpstan analyse -l 7 -c phpstan.neon src - - composer phpunit + - ./vendor/bin/phpstan analyse -l 7 -c phpstan.neon src tests + - ./vendor/bin/phpunit --coverage-clover=coverage.xml + +after_success: + - bash <(curl -s https://codecov.io/bash) \ No newline at end of file diff --git a/README.md b/README.md index 4ca1a3d..e1667eb 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,8 @@ -[![Build Status](https://travis-ci.org/ddebin/atom-generator.svg?branch=master)](https://travis-ci.org/ddebin/atom-generator) +![Travis (.org)](https://img.shields.io/travis/ddebin/atom-generator?logo=travis&style=for-the-badge) +![Codecov](https://img.shields.io/codecov/c/github/ddebin/atom-generator?logo=codecov&style=for-the-badge) +![PHP from Packagist](https://img.shields.io/packagist/php-v/ddebin/atom-generator?logo=php&style=for-the-badge) +![Packagist Version](https://img.shields.io/packagist/v/ddebin/atom-generator?style=for-the-badge) +![Packagist](https://img.shields.io/packagist/l/ddebin/atom-generator?style=for-the-badge) # Atom feed generator diff --git a/composer.json b/composer.json index aabd255..0590246 100644 --- a/composer.json +++ b/composer.json @@ -17,6 +17,8 @@ ], "require": { "php": "^7.1", + "ext-dom": "*", + "ext-simplexml": "*", "webmozart/assert": "^1.5" }, "require-dev": { diff --git a/composer.lock b/composer.lock index fc7d6d8..eadad76 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "6c8c1db7dfcc65fe38d938010b4f65e2", + "content-hash": "cd2795c8d8d7e6466bb20798975ef8bc", "packages": [ { "name": "symfony/polyfill-ctype", @@ -3466,7 +3466,9 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.1" + "php": "^7.1", + "ext-dom": "*", + "ext-simplexml": "*" }, "platform-dev": [], "platform-overrides": {