Skip to content

Commit

Permalink
Fix code coverage files not uploading
Browse files Browse the repository at this point in the history
  • Loading branch information
jacomago committed Nov 15, 2023
1 parent ca10c2e commit 553bc4c
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ name: Code coverage
on:
push:
branches: [ "master" ]
pull_request:

jobs:
codecov:
permissions:
checks: write
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -41,14 +43,23 @@ jobs:
if: success() || failure() # always run even if the previous step fails
with:
report_paths: '**/target/failsafe-reports/TEST-*.xml'
- name: Publish test coverage results
uses: PavanMudigonda/jacoco-reporter@v4.8
- name: Add coverage to PR
id: jacoco
uses: madrapps/jacoco-report@v1.6.1
with:
coverage_results_path: 'target/site/jacoco/jacoco.xml'
coverage_report_title: 'Test coverage results'
coverage_report_name: 'Test coverage results'
paths: |
${{ github.workspace }}/**/target/site/jacoco/jacoco.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 40
min-coverage-changed-files: 60
- name: Upload Code Coverage Artifacts
uses: actions/upload-artifact@v2
if: success() || failure() # always run even if the previous step fails
with:
name: code-coverage-report-markdown
path: '*/coverage-results.md'
name: code-coverage-reports
path: ${{ github.workspace }}/**/target/site/jacoco

- name: Get the Coverage info
run: |
echo "Total coverage ${{ steps.jacoco.outputs.coverage-overall }}"
echo "Changed Files coverage ${{ steps.jacoco.outputs.coverage-changed-files }}"

0 comments on commit 553bc4c

Please sign in to comment.