From 7718ca808d970f62c974275697ea34a4fe8993cd Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Mon, 18 Feb 2019 20:31:31 +0000 Subject: [PATCH] try adding code coverage things --- .travis.yml | 13 +++++++++---- README.md | 2 ++ composer.json | 11 +++++------ 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index f58ed387..ba73cccd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,7 @@ services: cache: directories: - $HOME/.composer/cache + - $HOME/vendor before_install: - mysql -e 'CREATE DATABASE postfixadmin;' @@ -17,11 +18,15 @@ before_install: before_script: - - composer install + - travis_retry composer install --no-interaction --prefer-source --dev + - mkdir -p build/logs script: - composer build - - composer test-sqlite - - composer test-mysql - - composer test-postgresql + - DATABASE=sqlite vendor/bin/phpunit tests/ + - DATABASE=mysql vendor/bin/phpunit --coverage-clover=build/logs/clover.xml tests/ + - DATABASE=postgresql vendor/bin/phpunit tests/ +after_success: + - travis_retry bash <(curl -s https://codecov.io/bash) -f build/logs/clover.xml + - travis_retry php vendor/bin/php-coveralls diff --git a/README.md b/README.md index 0e35e598..44b4e140 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ [![Build Status](https://travis-ci.org/postfixadmin/postfixadmin.svg?branch=master)](https://travis-ci.org/postfixadmin/postfixadmin) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/postfixadmin/Lobby) +[![codecov](https://codecov.io/gh/postfixadmin/postfixadmin/branch/master/graph/badge.svg)](https://codecov.io/gh/postfixadmin/postfixadmin) +[![Coverage Status](https://coveralls.io/repos/github/postfixadmin/postfixadmin/badge.svg?branch=master)](https://coveralls.io/github/postfixadmin/postfixadmin?branch=master) # PostfixAdmin diff --git a/composer.json b/composer.json index 6078e44a..d6cbf3bd 100644 --- a/composer.json +++ b/composer.json @@ -13,9 +13,7 @@ "check-format": "php-cs-fixer fix --ansi --dry-run --diff", "format": "php-cs-fixer fix --ansi", "lint": "@php ./vendor/bin/parallel-lint --exclude vendor/ --exclude lib/block_random_int.php --exclude lib/array_column.php .", - "test-sqlite": "DATABASE=sqlite ./vendor/bin/phpunit tests/", - "test-mysql": "DATABASE=mysql ./vendor/bin/phpunit tests/", - "test-postgresql": "DATABASE=postgresql ./vendor/bin/phpunit tests/", + "test": "DATABASE=sqlite ./vendor/bin/phpunit tests/", "test-fixup": "mkdir -p templates_c ; test -f config.local.php || touch config.local.php", "psalm": "@php ./vendor/bin/psalm --no-cache --show-info=false " }, @@ -23,13 +21,14 @@ "php": ">=5.2" }, "require-dev": { - "ext-sqlite3": "*", "ext-mysqli": "*", - "php": ">7.2.0", + "ext-sqlite3": "*", "friendsofphp/php-cs-fixer": "*", - "vimeo/psalm":"3.0.8", "jakub-onderka/php-parallel-lint": "^1.0", + "php": ">7.2.0", + "php-coveralls/php-coveralls" : "*", "phpunit/phpunit": "^6.0", + "vimeo/psalm":"3.0.8", "zendframework/zendframework1": "^1.12.0" }, "autoload": {