Merge pull request #6750 from alvasw/ci_upload_coverage_report_to_codacy

GitHub Actions: Upload Coverage Report to Codacy
This commit is contained in:
Gabriel Bernard 2023-07-12 12:01:54 +00:00 committed by GitHub
commit ca86bbdb83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,3 +29,25 @@ jobs:
uses: gradle/gradle-build-action@v2.5.1
with:
arguments: build jacocoTestReport testCodeCoverageReport --scan
- name: Upload coverage report
uses: actions/upload-artifact@v3
with:
name: coverage-report
path: code-coverage-report/build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml
publish_coverage:
name: Publish coverage
runs-on: ubuntu-latest
needs: build
steps:
- name: Download coverage report
uses: actions/download-artifact@v3
with:
name: coverage-report
path: code-coverage-report/build/reports/jacoco/testCodeCoverageReport
- name: Run codacy-coverage-reporter
uses: codacy/codacy-coverage-reporter-action@v1.3.0
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: ${{ github.workspace }}/code-coverage-report/build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml