diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 42465e62..16c7713f 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -25,23 +25,23 @@ jobs: submodules: 'recursive' - name: Set up JDK 11 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: - java-version: '8' + java-version: '17' distribution: 'temurin' - name: Build with Gradle - uses: gradle/gradle-build-action@v2 + uses: gradle/actions/setup-gradle@v3 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 - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} - files: ${{github.workspace}}/build/reports/jacoco/report.xml # optional + files: ${{github.workspace}}/report/build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml flags: unittests # optional name: codecov-umbrella # optional fail_ci_if_error: true # optional (default = false) diff --git a/README.md b/README.md index 182a1ed3..1c451dec 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![LoC](https://tokei.rs/b1/github/aergoio/heraj)](https://github.com/aergoio/heraj) [![github build](https://github.com/aergoio/heraj/actions/workflows/gradle.yml/badge.svg)](https://github.com/aergoio/aergo/actions/workflows/gradle.yml/badge.svg) -[![codecov.io](http://codecov.io/github/aergoio/heraj/coverage.svg?branch=develop)](http://codecov.io/github/aergoio/heraj?branch=develop) +[![codecov.io](https://codecov.io/github/aergoio/heraj/coverage.svg?branch=develop)](https://codecov.io/github/aergoio/heraj?branch=develop) The hera is the client-side framework for the aergo. This repository, heraj is java implementation for hera. diff --git a/build.gradle b/build.gradle index 20f82fbc..d26118f2 100644 --- a/build.gradle +++ b/build.gradle @@ -31,26 +31,11 @@ project(":") { javadoc.enabled = false sourceJar.enabled = false -// task allcoverage(type: JacocoReport) { -// def targetProjects = javaLibraryProjects.findAll { -// it.name != 'annotation' && it.name != 'protobuf' -// } -// dependsOn = targetProjects.collect{it.getTasksByName('coverage',false)} -// getSourceDirectories().setFrom(targetProjects.sourceSets.main.allSource.srcDirs) -// getClassDirectories().setFrom(targetProjects.sourceSets.main.output.classesDirs) -// getExecutionData().setFrom(targetProjects.collect{it.getTasksByName('jacocoTestReport', false).executionData}) -// reports { -// html.required = true -// xml.required = true -// xml.destination file("${buildDir}/reports/jacoco/report.xml") -// csv.required = false -// } -// afterEvaluate { -// getClassDirectories().setFrom(classDirectories.files.collect { -// fileTree(dir: it, exclude: ['types/**']) -// }) -// } -// } + task allcoverage { + dependsOn ':report:testCodeCoverageReport' + group = 'verification' + description = 'Runs the testCodeCoverageReport task in the report submodule.' + } task alljavadoc(type: Javadoc, group: 'Documentation') { def targetProjects = javaLibraryProjects.findAll {