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

GitHub Actions: Upload Coverage Report to Codacy #6750

Merged
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
22 changes: 22 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading