Skip to content

Commit

Permalink
attempt to enable codecov for datahub-gma (#375)
Browse files Browse the repository at this point in the history
  • Loading branch information
JiaoMaWHU authored Apr 15, 2024
1 parent 88460ac commit 88a6a4d
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,12 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: test-reports
path: /home/runner/work/datahub-gma/datahub-gma/dao-impl/ebean-dao/build/reports/tests/test/**
path: /home/runner/work/datahub-gma/datahub-gma/dao-impl/ebean-dao/build/reports/tests/test/**
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: linkedin/datahub-gma
- name: Slack failure notification
if: failure() && github.event_name == 'push'
uses: kpritam/slack-job-status-action@v1
Expand Down
13 changes: 13 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ allprojects {

subprojects { sp ->
apply plugin: 'maven'
apply plugin: 'jacoco'

plugins.withType(JavaPlugin) {
dependencies {
Expand All @@ -116,13 +117,25 @@ subprojects { sp ->
useTestNG()
}

test {
finalizedBy jacocoTestReport
}

checkstyle {
configDirectory = file("${project.rootDir}/gradle/checkstyle")
sourceSets = [ getProject().sourceSets.main, getProject().sourceSets.test ]
toolVersion = "8.35"
maxWarnings = 0
ignoreFailures = false
}

jacocoTestReport {
reports {
xml.enabled true
html.enabled true
csv.enabled false
}
}
}

afterEvaluate {
Expand Down
12 changes: 12 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
coverage:
status:
project:
default:
informational: true # set informational to true to not fail the build if coverage is below threshold
patch:
default:
informational: true # set informational to true to not fail the build if coverage is below threshold


# When modifying this file, please validate using
# curl -X POST --data-binary @codecov.yml https://codecov.io/validate

0 comments on commit 88a6a4d

Please sign in to comment.