Skip to content

Commit

Permalink
Merge pull request bisq-network#6772 from alvasw/fix_broken_codacy_co…
Browse files Browse the repository at this point in the history
…verage_reporter

Fix broken codacy coverage reporter
  • Loading branch information
alejandrogarcia83 authored Jul 17, 2023
2 parents 31d0241 + fe0b44e commit 1f809a1
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 23 deletions.
30 changes: 30 additions & 0 deletions .github/codacy-coverage-reporter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Codacy Coverage Reporter

on: ["push"]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
name: codacy-coverage-reporter
steps:
- uses: actions/[email protected]

- name: Set up JDK
uses: actions/[email protected]
with:
java-version: '15'
distribution: 'zulu'

- name: Build with Gradle
uses: gradle/[email protected]
with:
arguments: build jacocoTestReport testCodeCoverageReport --scan

- name: Run codacy-coverage-reporter
uses: codacy/[email protected]
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: ${{ github.workspace }}/code-coverage-report/build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml
24 changes: 1 addition & 23 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,4 @@ jobs:
- name: Build with Gradle
uses: gradle/[email protected]
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/[email protected]
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: ${{ github.workspace }}/code-coverage-report/build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml
arguments: build --scan

0 comments on commit 1f809a1

Please sign in to comment.