Skip to content

Commit

Permalink
work for codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
hayarobi committed Sep 4, 2023
1 parent 464ebf8 commit 36971ee
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/gradle.yml
Expand Up @@ -31,19 +31,24 @@ jobs:
distribution: 'temurin'

- name: Build with Gradle
if: github.event_name != 'push' || github.ref_name != 'feature/AMAIN-139_github_actions' || github.ref_type != 'branch'
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
with:
arguments: build
- name: Build and report code coverage with Gradle
if: github.event_name == 'push' && github.ref_name == 'feature/AMAIN-139_github_actions' && github.ref_type == 'branch'
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
with:
arguments: build allcoverage

# run unit test with code coverage report if action is triggered by push of master branch
# since Code Climate only evaluate code coverages of default branch.
- name: Unit Tests with publishing code coverage
if: github.event_name == 'push' && github.ref_name == 'feature/AMAIN-139_github_actions' && github.ref_type == 'branch'
uses: paambaati/codeclimate-action@v5
env:
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
JACOCO_SOURCE_PATH: "${{github.workspace}}/src/main/java"
uses: codecov/codecov-action@v3
with:
coverageCommand: ./gradlew allcoverage
coverageLocations: ${{github.workspace}}/build/reports/jacoco/report.xml:jacoco
debug: true
files: ${{github.workspace}}/build/reports/jacoco/report.xml # optional
flags: unittests # optional
name: codecov-umbrella # optional
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)

0 comments on commit 36971ee

Please sign in to comment.