Skip to content

Commit

Permalink
Replace Coveralls by Codecov
Browse files Browse the repository at this point in the history
We found that Coveralls is not able to merge coverage reports from
different job runs. Since supporting PHP8, we have different code
branches in order to support the old and the new PDO interface.

So, it is crucial to merge coverage reports from two job runs, one
for PHP7.4 and another for PHP8.
  • Loading branch information
amotl committed Feb 25, 2021
1 parent ee4a0cb commit e8d8b99
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,13 @@ jobs:
- name: Run tests
run: composer run test

# https://github.com/php-coveralls/php-coveralls#github-actions
- name: Upload coverage results to Coveralls
# https://github.com/codecov/codecov-action
- name: Upload coverage results to Codecov
uses: codecov/codecov-action@v1
if: always() && (matrix.php-version == '7.4' || matrix.php-version == '8.0')
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer global require php-coveralls/php-coveralls
php-coveralls --coverage_clover=build/logs/clover.xml -v
with:
files: ./build/logs/clover.xml
fail_ci_if_error: true

- name: Upload coverage results to Scrutinizer CI
if: always() && (matrix.php-version == '7.4' || matrix.php-version == '8.0')
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ CrateDB PDO Adapter
:target: https://github.com/crate/crate-pdo/actions?workflow=Docs
:alt: Build status (documentation)

.. image:: https://coveralls.io/repos/github/crate/crate-pdo/badge.svg?branch=main
:target: https://coveralls.io/github/crate/crate-pdo
.. image:: https://codecov.io/gh/crate/crate-pdo/branch/main/graph/badge.svg
:target: https://app.codecov.io/gh/crate/crate-pdo
:alt: Coverage

.. image:: https://scrutinizer-ci.com/g/crate/crate-pdo/badges/quality-score.png?b=main
Expand Down
8 changes: 8 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# https://docs.codecov.io/docs/common-recipe-list

coverage:
status:
project:
default:
target: 85% # the required coverage value
threshold: 3% # the leniency in hitting the target

0 comments on commit e8d8b99

Please sign in to comment.