From ff03a49f3815f166943517d7b5a168bf8aa5e31d Mon Sep 17 00:00:00 2001 From: indivar Date: Sat, 24 Jun 2023 22:25:37 +0530 Subject: [PATCH] add(751): add coverage report --- .github/workflows/ci.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c2ddcd7..6e260b3d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,9 @@ on: branches: - master # Only run when PR is raised for master +permissions: + pull-requests: write # for writting comment for coverage + # This ensures for a single PR one job is run in case of multiple runs concurrency: group: build-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -21,3 +24,22 @@ jobs: # Run Tests - name: Run Tests run: docker-compose -f "docker-compose.test.yml" up --build + # Code Coverage + - name: Code Coverage Report + uses: irongut/CodeCoverageSummary@v1.3.0 + with: + filename: ./temp/testresults/coverage.xml + badge: true + fail_below_min: true + format: markdown + hide_branch_rate: false + hide_complexity: true + indicators: true + output: both + thresholds: '60 80' + - name: Add Coverage PR Comment + uses: marocchino/sticky-pull-request-comment@v2 + if: github.event_name == 'pull_request' + with: + recreate: true + path: code-coverage-results.md