From f8844bcfef85bfc64656db7ae2f4456253298f96 Mon Sep 17 00:00:00 2001 From: "tien.xuan.vo" Date: Mon, 13 May 2024 08:50:34 +0700 Subject: [PATCH] ci: Upload code coverage to coveralls --- .github/workflows/build.yml | 17 +++++++++++++++++ README.md | 1 + 2 files changed, 18 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index db2ab5b4..14fffeaa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -156,3 +156,20 @@ jobs: run: vendor/bin/phpunit --testsuite unit env: PACT_DO_NOT_TRACK: true + + - name: Coveralls Parallel + uses: coverallsapp/github-action@v2 + with: + flag-name: ${{ matrix.php }}-${{ matrix.dependencies }} + parallel: true + file: test_results/reports/test_coverage_results.xml + + finish: + needs: unit + if: ${{ always() }} + runs-on: ubuntu-latest + steps: + - name: Coveralls Finished + uses: coverallsapp/github-action@v2 + with: + parallel-finished: true diff --git a/README.md b/README.md index 4bb6c150..ad821a7b 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ ![Code Analysis & Test](https://github.com/pact-foundation/pact-php/actions/workflows/build.yml/badge.svg) +[![Coverage Status](https://coveralls.io/repos/github/pact-foundation/pact-php/badge.svg?branch=HEAD)](https://coveralls.io/github/pact-foundation/pact-php?branch=HEAD) ![Compatibility Suite](https://github.com/pact-foundation/pact-php/actions/workflows/compatibility-suite.yml/badge.svg) [![Packagist](https://img.shields.io/packagist/v/pact-foundation/pact-php?style=flat-square)](https://packagist.org/packages/pact-foundation/pact-php)