Merge pull request #18 from open-feature/coverage
Add coverage validation
This commit is contained in:
commit
df24d2bea8
|
|
@ -31,6 +31,14 @@ jobs:
|
||||||
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
|
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
|
||||||
with:
|
with:
|
||||||
arguments: build
|
arguments: build
|
||||||
|
- name: Upload coverage to Codecov
|
||||||
|
uses: codecov/codecov-action@v2
|
||||||
|
with:
|
||||||
|
directory: lib/build
|
||||||
|
flags: unittests # optional
|
||||||
|
name: coverage # optional
|
||||||
|
fail_ci_if_error: true # optional (default = false)
|
||||||
|
verbose: true # optional (default = false)
|
||||||
# The USERNAME and TOKEN need to correspond to the credentials environment variables used in
|
# The USERNAME and TOKEN need to correspond to the credentials environment variables used in
|
||||||
# the publishing section of your build.gradle
|
# the publishing section of your build.gradle
|
||||||
- name: Publish to Sonatype (Maven)
|
- name: Publish to Sonatype (Maven)
|
||||||
|
|
|
||||||
|
|
@ -30,4 +30,12 @@ jobs:
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
|
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
|
||||||
with:
|
with:
|
||||||
arguments: build
|
arguments: build
|
||||||
|
- name: Upload coverage to Codecov
|
||||||
|
uses: codecov/codecov-action@v2
|
||||||
|
with:
|
||||||
|
directory: lib/build
|
||||||
|
flags: unittests # optional
|
||||||
|
name: pr coverage # optional
|
||||||
|
fail_ci_if_error: true # optional (default = false)
|
||||||
|
verbose: true # optional (default = false)
|
||||||
|
|
@ -13,6 +13,7 @@ plugins {
|
||||||
id 'pmd'
|
id 'pmd'
|
||||||
id 'maven-publish'
|
id 'maven-publish'
|
||||||
id 'signing'
|
id 'signing'
|
||||||
|
id 'jacoco'
|
||||||
}
|
}
|
||||||
|
|
||||||
pmd {
|
pmd {
|
||||||
|
|
@ -44,6 +45,16 @@ tasks.named('test') {
|
||||||
useJUnitPlatform()
|
useJUnitPlatform()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test {
|
||||||
|
finalizedBy jacocoTestReport // report is always generated after tests run
|
||||||
|
}
|
||||||
|
jacocoTestReport {
|
||||||
|
dependsOn test // tests are required to run before generating the report
|
||||||
|
reports {
|
||||||
|
xml.required = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||||
archiveClassifier = 'sources'
|
archiveClassifier = 'sources'
|
||||||
archiveBaseName = 'openfeature'
|
archiveBaseName = 'openfeature'
|
||||||
|
|
@ -54,7 +65,6 @@ artifacts {
|
||||||
archives sourcesJar
|
archives sourcesJar
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
jar.archiveBaseName = 'openfeature'
|
jar.archiveBaseName = 'openfeature'
|
||||||
|
|
||||||
def repo_url = System.getenv("REPOSITORY_URL")
|
def repo_url = System.getenv("REPOSITORY_URL")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue