Skip to content

Commit

Permalink
Sending coverage report to Codecov.io (#7)
Browse files Browse the repository at this point in the history
* Sending coverage report to Codecov.io
* Replaced Coveralls badge to new Codecov
  • Loading branch information
SmetDenis committed May 6, 2021
1 parent d0600c7 commit 599b748
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@ jobs:
continue-on-error: ${{ matrix.experimental }}
run: make test --no-print-directory

- name: Codecov Report
uses: codecov/codecov-action@v1
continue-on-error: ${{ matrix.experimental }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: '*.xml'
directory: ./build/coverage_xml/
fail_ci_if_error: true


linters:
name: Linters
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# JBZoo / CI-Report-Converter

[![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)
[![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)
[![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)


Expand Down
17 changes: 16 additions & 1 deletion tests/CiReportConverterReadmeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class CiReportConverterReadmeTest extends AbstractReadmeTest
'travis',
'github_actions',
'docker_build',
'coveralls',
'codecov',
'psalm_coverage',
'scrutinizer',
'__BR__',
Expand All @@ -68,6 +68,7 @@ protected function setUp(): void
$this->params['github_actions'] = true;
$this->params['scrutinizer'] = true;
$this->params['php_version'] = true;
$this->params['codecov'] = true;
}

/**
Expand Down Expand Up @@ -106,6 +107,20 @@ protected function checkBadgePhpVersion(): ?string
));
}

/**
* @return string|null
*/
protected function checkBadgeCodecov(): ?string
{
// [![](?token=UZFE4SIEUC)]()

return $this->getPreparedBadge($this->getBadge(
'codecov',
'https://codecov.io/gh/__VENDOR_ORIG__/__PACKAGE_ORIG__/branch/master/graph/badge.svg',
'https://codecov.io/gh/__VENDOR_ORIG__/__PACKAGE_ORIG__'
));
}

public function testMapTable()
{
isFileContains(Map::getMarkdownTable(), PROJECT_ROOT . '/README.md');
Expand Down

0 comments on commit 599b748

Please sign in to comment.