Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Codecov to CI Pipeline #820

Merged
merged 4 commits into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,19 @@ jobs:
arguments: shellcheck
if: runner.os == 'Linux'
- name: Report jacoco coverage
armughan11 marked this conversation as resolved.
Show resolved Hide resolved
id: jacoco_report
uses: gradle/gradle-build-action@v2
env:
ORG_GRADLE_PROJECT_epApiVersion: ${{ matrix.epVersion }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
with:
arguments: coveralls
arguments: codeCoverageReport
continue-on-error: true
if: runner.os == 'Linux' && matrix.java == '11' && matrix.epVersion == '2.21.1' && github.repository == 'uber/NullAway'
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
files: ./code-coverage-report/build/reports/jacoco/codeCoverageReport/codeCoverageReport.xml
if: steps.jacoco_report.outcome == 'success'
- name: Test publishToMavenLocal flow
env:
ORG_GRADLE_PROJECT_epApiVersion: ${{ matrix.epVersion }}
Expand Down
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ plugins {
id "com.diffplug.spotless" version "6.20.0"
id "net.ltgt.errorprone" version "3.1.0" apply false
id "com.github.johnrengelman.shadow" version "8.1.1" apply false
id "com.github.kt3k.coveralls" version "2.12.0" apply false
id "me.champeau.jmh" version "0.7.1" apply false
id "com.github.ben-manes.versions" version "0.47.0"
id "com.felipefzdz.gradle.shellcheck" version "1.4.6"
Expand Down
14 changes: 0 additions & 14 deletions code-coverage-report/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
plugins {
id 'java'
id 'jacoco'
id 'com.github.kt3k.coveralls'
}

// Use JDK 17 for this module, via a toolchain. We need JDK 17 since this module
Expand Down Expand Up @@ -71,19 +70,6 @@ def codeCoverageReport = tasks.register('codeCoverageReport', JacocoReport) {
}
}

coveralls {
jacocoReportPath = "build/reports/jacoco/codeCoverageReport/codeCoverageReport.xml"
afterEvaluate {
sourceDirs = sourcesPath.incoming.artifactView { lenient(true) }.files as List<String>
}
}

def coverallsTask = tasks.named('coveralls')

coverallsTask.configure {
dependsOn 'codeCoverageReport'
}

// These dependencies indicate which projects have tests or tested code we want to include
// when computing overall coverage. We aim to measure coverage for all code that actually ships
// in a Maven artifact (so, e.g., we do not measure coverage for the jmh module)
Expand Down