From 12fbe26fa9f7a796ba49b07374cfe0068bea5328 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Thu, 25 Feb 2021 01:44:37 +0100 Subject: [PATCH] Replace Coveralls by Codecov 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. --- .github/workflows/tests.yml | 13 ++++++------- README.rst | 4 ++-- codecov.yml | 8 ++++++++ 3 files changed, 16 insertions(+), 9 deletions(-) create mode 100644 codecov.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ca51418..cdf79fe 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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') diff --git a/README.rst b/README.rst index fb7c2bc..8c3bcaa 100644 --- a/README.rst +++ b/README.rst @@ -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 diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000..b9b686e --- /dev/null +++ b/codecov.yml @@ -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