mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-12-22 19:49:32 +00:00
send coverage results to codacy after every successful ci build
This commit is contained in:
parent
295e20bf04
commit
6ea642555e
2 changed files with 21 additions and 0 deletions
10
.github/workflows/build.yml
vendored
10
.github/workflows/build.yml
vendored
|
@ -28,6 +28,11 @@ jobs:
|
|||
run: git lfs pull
|
||||
- name: Build with make
|
||||
run: make
|
||||
- name: Send coverage report to Codacy
|
||||
env:
|
||||
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
||||
if: success()
|
||||
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r assets/build/reports/jacoco/test/jacocoTestReport.xml
|
||||
- name: cache nodes dependencies
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
|
@ -61,3 +66,8 @@ jobs:
|
|||
run: git lfs pull
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew build --stacktrace --scan
|
||||
- name: Send coverage report to Codacy
|
||||
env:
|
||||
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
||||
if: success()
|
||||
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r assets/build/reports/jacoco/test/jacocoTestReport.xml
|
||||
|
|
11
build.gradle
11
build.gradle
|
@ -23,6 +23,8 @@ configure(rootProject) {
|
|||
configure(subprojects) {
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'com.google.osdetector'
|
||||
// Apply the jacoco plugin to add support for test coverage
|
||||
apply plugin: 'jacoco'
|
||||
|
||||
sourceCompatibility = 1.10
|
||||
|
||||
|
@ -91,6 +93,15 @@ configure(subprojects) {
|
|||
tasks.withType(JavaCompile) {
|
||||
options.encoding = 'UTF-8'
|
||||
}
|
||||
|
||||
jacocoTestReport {
|
||||
reports {
|
||||
xml.enabled true
|
||||
html.enabled false
|
||||
}
|
||||
}
|
||||
// Codacy report generated with every build at assets/build/reports/jacoco/test/jacocoTestReport.xml
|
||||
test.finalizedBy jacocoTestReport
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue