Skip to content

Commit

Permalink
Replace Scrutinizer with Codecov for code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
scheb committed Feb 25, 2024
1 parent 21af991 commit 7378c3e
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 37 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
/.gitignore export-ignore
/.gitsplit.yml export-ignore
/.php_cs.dist export-ignore
/.scrutinizer.yml export-ignore
/CONTRIBUTING.md export-ignore
/php_cs.xml export-ignore
/phpunit.xml.dist export-ignore
Expand Down
26 changes: 15 additions & 11 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ on:
jobs:
coding-standards:
name: 'Coding Standards - PHP ${{ matrix.php-version }}'

runs-on: 'ubuntu-latest'
# We want to run on external PRs, but not on our own internal PRs as they'll be run by the push to the branch.
if: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }}

strategy:
fail-fast: false
Expand Down Expand Up @@ -54,8 +55,9 @@ jobs:

tests:
name: 'Tests - PHP ${{ matrix.php-version }}'

runs-on: ubuntu-latest
# We want to run on external PRs, but not on our own internal PRs as they'll be run by the push to the branch.
if: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }}

strategy:
fail-fast: false
Expand Down Expand Up @@ -96,8 +98,9 @@ jobs:

code-coverage:
name: 'Code Coverage - PHP ${{ matrix.php-version }}'

runs-on: 'ubuntu-latest'
# We want to run on external PRs, but not on our own internal PRs as they'll be run by the push to the branch.
if: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }}

strategy:
fail-fast: false
Expand All @@ -112,7 +115,7 @@ jobs:
- name: 'Setup PHP'
uses: shivammathur/setup-php@v2
with:
coverage: 'none'
coverage: 'pcov'
extensions: 'json,dom'
php-version: '${{ matrix.php-version }}'

Expand All @@ -130,11 +133,12 @@ jobs:
run: composer show

- name: 'Run tests with coverage'
run: phpdbg -qrr vendor/bin/phpunit --coverage-clover coverage/clover.xml
run: vendor/bin/phpunit --coverage-clover coverage/clover.xml

- name: 'Send Coverage'
continue-on-error: true
timeout-minutes: 1
run: |
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover coverage/clover.xml
- name: 'Send Coverage to Codecov'
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage/clover.xml
flags: unittests
fail_ci_if_error: true
17 changes: 0 additions & 17 deletions .scrutinizer.yml

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ Implements the concept of **tombstones for dead code detection in PHP**.
The library provides you with a toolbox to place, track and evaluate tombstones in your code.

[![Build Status](https://github.com/scheb/tombstone/workflows/CI/badge.svg?branch=1.x)](https://github.com/scheb/tombstone/actions?query=workflow%3ACI+branch%3A1.x)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/scheb/tombstone/badges/quality-score.png?b=1.x)](https://scrutinizer-ci.com/g/scheb/tombstone/?branch=1.x)
[![Code Coverage](https://scrutinizer-ci.com/g/scheb/tombstone/badges/coverage.png?b=1.x)](https://scrutinizer-ci.com/g/scheb/tombstone/?branch=1.x)
[![Code Coverage](https://codecov.io/gh/scheb/tombstone/branch/1.x/graph/badge.svg)](https://app.codecov.io/gh/scheb/tombstone/branch/1.x)
[![Latest Stable Version](https://img.shields.io/packagist/v/scheb/tombstone)](https://packagist.org/packages/scheb/tombstone)
[![Monthly Downloads](https://img.shields.io/packagist/dm/scheb/tombstone)](https://packagist.org/packages/scheb/tombstone/stats)
[![Total Downloads](https://img.shields.io/packagist/dt/scheb/tombstone)](https://packagist.org/packages/scheb/tombstone/stats)
Expand Down
3 changes: 1 addition & 2 deletions src/analyzer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ scheb/tombstone-analyzer
========================

[![Build Status](https://github.com/scheb/tombstone/workflows/CI/badge.svg?branch=1.x)](https://github.com/scheb/tombstone/actions?query=workflow%3ACI+branch%3A1.x)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/scheb/tombstone/badges/quality-score.png?b=1.x)](https://scrutinizer-ci.com/g/scheb/tombstone/?branch=1.x)
[![Code Coverage](https://scrutinizer-ci.com/g/scheb/tombstone/badges/coverage.png?b=1.x)](https://scrutinizer-ci.com/g/scheb/tombstone/?branch=1.x)
[![Code Coverage](https://codecov.io/gh/scheb/tombstone/branch/1.x/graph/badge.svg)](https://app.codecov.io/gh/scheb/tombstone/branch/1.x)
[![Latest Stable Version](https://img.shields.io/packagist/v/scheb/tombstone-analyzer)](https://packagist.org/packages/scheb/tombstone-analyzer)
[![Monthly Downloads](https://img.shields.io/packagist/dm/scheb/tombstone-analyzer)](https://packagist.org/packages/scheb/tombstone-analyzer/stats)
[![Total Downloads](https://img.shields.io/packagist/dt/scheb/tombstone-analyzer)](https://packagist.org/packages/scheb/tombstone-analyzer/stats)
Expand Down
3 changes: 1 addition & 2 deletions src/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ scheb/tombstone-core
====================

[![Build Status](https://github.com/scheb/tombstone/workflows/CI/badge.svg?branch=1.x)](https://github.com/scheb/tombstone/actions?query=workflow%3ACI+branch%3A1.x)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/scheb/tombstone/badges/quality-score.png?b=1.x)](https://scrutinizer-ci.com/g/scheb/tombstone/?branch=1.x)
[![Code Coverage](https://scrutinizer-ci.com/g/scheb/tombstone/badges/coverage.png?b=1.x)](https://scrutinizer-ci.com/g/scheb/tombstone/?branch=1.x)
[![Code Coverage](https://codecov.io/gh/scheb/tombstone/branch/1.x/graph/badge.svg)](https://app.codecov.io/gh/scheb/tombstone/branch/1.x)
[![Latest Stable Version](https://img.shields.io/packagist/v/scheb/tombstone-core)](https://packagist.org/packages/scheb/tombstone-core)
[![Monthly Downloads](https://img.shields.io/packagist/dm/scheb/tombstone-core)](https://packagist.org/packages/scheb/tombstone-core/stats)
[![Total Downloads](https://img.shields.io/packagist/dt/scheb/tombstone-core)](https://packagist.org/packages/scheb/tombstone-core/stats)
Expand Down
3 changes: 1 addition & 2 deletions src/logger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ scheb/tombstone-logger
======================

[![Build Status](https://github.com/scheb/tombstone/workflows/CI/badge.svg?branch=1.x)](https://github.com/scheb/tombstone/actions?query=workflow%3ACI+branch%3A1.x)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/scheb/tombstone/badges/quality-score.png?b=1.x)](https://scrutinizer-ci.com/g/scheb/tombstone/?branch=1.x)
[![Code Coverage](https://scrutinizer-ci.com/g/scheb/tombstone/badges/coverage.png?b=1.x)](https://scrutinizer-ci.com/g/scheb/tombstone/?branch=1.x)
[![Code Coverage](https://codecov.io/gh/scheb/tombstone/branch/1.x/graph/badge.svg)](https://app.codecov.io/gh/scheb/tombstone/branch/1.x)
[![Latest Stable Version](https://img.shields.io/packagist/v/scheb/tombstone-logger)](https://packagist.org/packages/scheb/tombstone-logger)
[![Monthly Downloads](https://img.shields.io/packagist/dm/scheb/tombstone-logger)](https://packagist.org/packages/scheb/tombstone-logger/stats)
[![Total Downloads](https://img.shields.io/packagist/dt/scheb/tombstone-logger)](https://packagist.org/packages/scheb/tombstone-logger/stats)
Expand Down

0 comments on commit 7378c3e

Please sign in to comment.