diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 43550ffde1..cd20081396 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -18,6 +18,8 @@ jobs: java: [8, 11] steps: - uses: actions/checkout@v2 + with: + fetch-depth: 1 - uses: actions/setup-java@v1 with: java-version: ${{ matrix.java }} @@ -60,6 +62,15 @@ jobs: name: artifacts path: ~/artifacts + - name: Generate Code Coverage Report + run: bazel coverage //src/test/... --combined_report=lcov + + - name: Upload Code Coverage Report + uses: codecov/codecov-action@v1 + with: + name: actions ${{ matrix.java }} + files: ./bazel-out/_coverage/_coverage_report.dat + license-header: runs-on: ubuntu-latest steps: diff --git a/README.md b/README.md index 5c397090a9..81e7a60189 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +[![codecov](https://codecov.io/gh/googleapis/gapic-generator-java/branch/master/graph/badge.svg?token=3RUU37GX9U)](https://codecov.io/gh/googleapis/gapic-generator-java) # API Client Generator for Java A generator for protocol buffer described APIs for and in Java. diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000000..6508e14940 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,21 @@ +codecov: + notify: + require_ci_to_pass: yes + + coverage: + precision: 2 + round: down + range: 70...100 + + status: + project: true + default: + informational: true + patch: true + default: + informatioanl: true + changes: false + + comment: + layout: "header, diff, uncovered" + behavior: default # update if exists else create new \ No newline at end of file