Skip to content

Commit 599b748

Browse files
authored
Sending coverage report to Codecov.io (#7)
* Sending coverage report to Codecov.io * Replaced Coveralls badge to new Codecov
1 parent d0600c7 commit 599b748

3 files changed

Lines changed: 26 additions & 2 deletions

File tree

.github/workflows/main.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,15 @@ jobs:
6565
continue-on-error: ${{ matrix.experimental }}
6666
run: make test --no-print-directory
6767

68+
- name: Codecov Report
69+
uses: codecov/codecov-action@v1
70+
continue-on-error: ${{ matrix.experimental }}
71+
with:
72+
token: ${{ secrets.CODECOV_TOKEN }}
73+
files: '*.xml'
74+
directory: ./build/coverage_xml/
75+
fail_ci_if_error: true
76+
6877

6978
linters:
7079
name: Linters

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# JBZoo / CI-Report-Converter
22

3-
[![Travis](https://travis-ci.org/JBZoo/CI-Report-Converter.svg?branch=master)](https://travis-ci.org/JBZoo/CI-Report-Converter) [![CI](https://github.com/JBZoo/CI-Report-Converter/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/JBZoo/CI-Report-Converter/actions/workflows/main.yml) [![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/jbzoo/ci-report-converter.svg)](https://hub.docker.com/r/jbzoo/ci-report-converter) [![Coverage Status](https://coveralls.io/repos/JBZoo/CI-Report-Converter/badge.svg)](https://coveralls.io/github/JBZoo/CI-Report-Converter) [![Psalm Coverage](https://shepherd.dev/github/JBZoo/CI-Report-Converter/coverage.svg)](https://shepherd.dev/github/JBZoo/CI-Report-Converter) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/jbzoo/ci-report-converter/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/jbzoo/ci-report-converter/?branch=master)
3+
[![Travis](https://travis-ci.org/JBZoo/CI-Report-Converter.svg?branch=master)](https://travis-ci.org/JBZoo/CI-Report-Converter) [![CI](https://github.com/JBZoo/CI-Report-Converter/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/JBZoo/CI-Report-Converter/actions/workflows/main.yml) [![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/jbzoo/ci-report-converter.svg)](https://hub.docker.com/r/jbzoo/ci-report-converter) [![codecov](https://codecov.io/gh/JBZoo/CI-Report-Converter/branch/master/graph/badge.svg)](https://codecov.io/gh/JBZoo/CI-Report-Converter) [![Psalm Coverage](https://shepherd.dev/github/JBZoo/CI-Report-Converter/coverage.svg)](https://shepherd.dev/github/JBZoo/CI-Report-Converter) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/jbzoo/ci-report-converter/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/jbzoo/ci-report-converter/?branch=master)
44
[![PHP Version](https://img.shields.io/packagist/php-v/jbzoo/ci-report-converter)](https://github.com/JBZoo/CI-Report-Converter/blob/master/composer.json) [![PHP Strict Types](https://img.shields.io/badge/strict__types-%3D1-brightgreen)](https://www.php.net/manual/en/language.types.declarations.php#language.types.declarations.strict) [![Stable Version](https://poser.pugx.org/jbzoo/ci-report-converter/version)](https://packagist.org/packages/jbzoo/ci-report-converter) [![Total Downloads](https://poser.pugx.org/jbzoo/ci-report-converter/downloads)](https://packagist.org/packages/jbzoo/ci-report-converter/stats) [![Docker Pulls](https://img.shields.io/docker/pulls/jbzoo/ci-report-converter.svg)](https://hub.docker.com/r/jbzoo/ci-report-converter) [![GitHub Issues](https://img.shields.io/github/issues/jbzoo/ci-report-converter)](https://github.com/JBZoo/CI-Report-Converter/issues) [![GitHub License](https://img.shields.io/github/license/jbzoo/ci-report-converter)](https://github.com/JBZoo/CI-Report-Converter/blob/master/LICENSE)
55

66

tests/CiReportConverterReadmeTest.php

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class CiReportConverterReadmeTest extends AbstractReadmeTest
4242
'travis',
4343
'github_actions',
4444
'docker_build',
45-
'coveralls',
45+
'codecov',
4646
'psalm_coverage',
4747
'scrutinizer',
4848
'__BR__',
@@ -68,6 +68,7 @@ protected function setUp(): void
6868
$this->params['github_actions'] = true;
6969
$this->params['scrutinizer'] = true;
7070
$this->params['php_version'] = true;
71+
$this->params['codecov'] = true;
7172
}
7273

7374
/**
@@ -106,6 +107,20 @@ protected function checkBadgePhpVersion(): ?string
106107
));
107108
}
108109

110+
/**
111+
* @return string|null
112+
*/
113+
protected function checkBadgeCodecov(): ?string
114+
{
115+
// [![](?token=UZFE4SIEUC)]()
116+
117+
return $this->getPreparedBadge($this->getBadge(
118+
'codecov',
119+
'https://codecov.io/gh/__VENDOR_ORIG__/__PACKAGE_ORIG__/branch/master/graph/badge.svg',
120+
'https://codecov.io/gh/__VENDOR_ORIG__/__PACKAGE_ORIG__'
121+
));
122+
}
123+
109124
public function testMapTable()
110125
{
111126
isFileContains(Map::getMarkdownTable(), PROJECT_ROOT . '/README.md');

0 commit comments

Comments
 (0)