File tree Expand file tree Collapse file tree 3 files changed +53
-0
lines changed Expand file tree Collapse file tree 3 files changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Workflow for Codecov
2+ on : [push, pull_request]
3+ jobs :
4+ run :
5+ runs-on : ubuntu-latest
6+ steps :
7+ - name : Checkout
8+ uses : actions/checkout@v4
9+ with :
10+ submodules : ' true'
11+ - name : Set up JDK 11
12+ uses : actions/setup-java@v3
13+ with :
14+ distribution : ' temurin'
15+ java-version : 11
16+ - name : Install dependencies, run tests, and collect coverage
17+ run : ./gradlew jacocoTestReport
18+ - name : Upload coverage to Codecov
19+ uses : codecov/codecov-action@v4
20+ env :
21+ CODECOV_TOKEN : ${{ secrets.CODECOV_ORG_TOKEN }}
22+ slug : uber/cadence
Original file line number Diff line number Diff line change @@ -355,6 +355,7 @@ jacoco {
355355}
356356
357357jacocoTestReport {
358+ dependsOn test
358359 reports {
359360 xml. enabled = true // coveralls plugin depends on xml format report
360361 html. enabled = true
Original file line number Diff line number Diff line change 1+ # Refs:
2+ # - https://docs.codecov.com/docs/common-recipe-list
3+ # - https://docs.codecov.com/docs/codecovyml-reference
4+ #
5+ # After making changes, run below command to validate
6+ # curl --data-binary @codecov.yml https://codecov.io/validate
7+ coverage :
8+ range : 80...100
9+ round : down
10+ precision : 2
11+ status :
12+ project : # measuring the overall project coverage
13+ default : # context, you can create multiple ones with custom titles
14+ informational : true
15+ target : 85% # specify the target coverage for each commit status
16+ # option: "auto" (compare against parent commit or pull request base)
17+ # option: "X%" a static target percentage to hit
18+ threshold : 0% # allow the coverage drop by x% before marking as failure
19+ if_ci_failed : ignore # require the CI to pass before setting the status
20+ patch :
21+ default :
22+ target : 85% # specify the target coverage for each commit status
23+ # option: "auto" (compare against parent commit or pull request base)
24+ # option: "X%" a static target percentage to hit
25+ threshold : 0% # allow the coverage drop by x% before marking as failure
26+ comment :
27+ layout : " header, files, footer"
28+ hide_project_coverage : false
29+ codecov :
30+ require_ci_to_pass : false
You can’t perform that action at this time.
0 commit comments