diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 95730d56..9d14ebee 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -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)