Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix code coverage files not uploading #109

Merged
merged 1 commit into from
Nov 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}"