Skip to content

Commit 773a0df

Browse files
runningcodeclaude
andauthored
ci: Remove Codecov and code coverage tooling (JAVA-560) (#5547)
* ci: Remove Codecov and code coverage tooling (JAVA-560) Remove the Codecov service integration (codecov.yml, the README badge, and the upload steps across all CI workflows) along with the JaCoCo and Kover coverage tooling that only existed to feed it: the plugins, report and verification tasks across all modules, the version catalog entries, the Config.kt coverage threshold, and the createCoverageReports Makefile target. No SDK code or public API is affected. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * test(sentry): Restore java.lang open after jacoco removal (JAVA-560) SentryTest reflectively rewrites a class's name to fake the Android environment, which requires --add-opens java.base/java.lang=ALL-UNNAMED. The jacoco test agent was implicitly providing this open; now that jacoco is removed, declare it explicitly so the sentry unit tests keep passing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 3eb7173 commit 773a0df

63 files changed

Lines changed: 20 additions & 928 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/agp-matrix.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,3 @@ jobs:
112112
reporter: java-junit
113113
output-to: step-summary
114114
fail-on-error: false
115-
116-
- name: Upload test results to Codecov
117-
if: ${{ !cancelled() }}
118-
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3
119-
with:
120-
token: ${{ secrets.CODECOV_TOKEN }}
121-
file: build/outputs/androidTest-results/**/*.xml

.github/workflows/build.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
with:
4343
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
4444

45-
- name: Run Tests with coverage and Lint
45+
- name: Run Tests and Lint
4646
run: make preMerge
4747

4848
- name: Install Sentry CLI
@@ -57,13 +57,6 @@ jobs:
5757
SENTRY_ORG: sentry-sdks
5858
SENTRY_PROJECT: sentry-android
5959

60-
- name: Upload coverage to Codecov
61-
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # pin@v4
62-
with:
63-
name: sentry-java
64-
fail_ci_if_error: false
65-
token: ${{ secrets.CODECOV_TOKEN }}
66-
6760
- name: Upload test results
6861
if: always()
6962
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7

.github/workflows/integration-tests-ui.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,3 @@ jobs:
9494
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
9595
SENTRY_ORG: sentry-sdks
9696
SENTRY_PROJECT: sentry-android
97-
98-
- name: Upload test results to Codecov
99-
if: ${{ !cancelled() }}
100-
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3
101-
with:
102-
token: ${{ secrets.CODECOV_TOKEN }}
103-
file: ./artifacts/*.xml

.github/workflows/spring-boot-2-matrix.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,3 @@ jobs:
150150
reporter: java-junit
151151
output-to: step-summary
152152
fail-on-error: false
153-
154-
- name: Upload test results to Codecov
155-
if: ${{ !cancelled() }}
156-
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3
157-
with:
158-
token: ${{ secrets.CODECOV_TOKEN }}
159-
file: '**/build/test-results/**/*.xml'

.github/workflows/spring-boot-3-matrix.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,3 @@ jobs:
146146
reporter: java-junit
147147
output-to: step-summary
148148
fail-on-error: false
149-
150-
- name: Upload test results to Codecov
151-
if: ${{ !cancelled() }}
152-
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3
153-
with:
154-
token: ${{ secrets.CODECOV_TOKEN }}
155-
file: '**/build/test-results/**/*.xml'

.github/workflows/spring-boot-4-matrix.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,3 @@ jobs:
146146
reporter: java-junit
147147
output-to: step-summary
148148
fail-on-error: false
149-
150-
- name: Upload test results to Codecov
151-
if: ${{ !cancelled() }}
152-
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3
153-
with:
154-
token: ${{ secrets.CODECOV_TOKEN }}
155-
file: '**/build/test-results/**/*.xml'

AGENTS.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ The project uses **Gradle** with Kotlin DSL. Key build files:
3737
# Build entire project
3838
./gradlew build
3939

40-
# Create coverage reports
41-
./gradlew jacocoTestReport koverXmlReportRelease
42-
4340
# Generate documentation
4441
./gradlew aggregateJavadocs
4542
```
@@ -149,7 +146,6 @@ The repository is organized into multiple modules:
149146
- Write comprehensive unit tests for new features
150147
- Android modules require both unit tests and instrumented tests where applicable
151148
- System tests validate end-to-end functionality with sample applications
152-
- Coverage reports are generated for both JaCoCo (Java/Android) and Kover (KMP modules)
153149

154150
### Contributing Guidelines
155151
1. Follow existing code style and language

Makefile

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
.PHONY: all clean compile javadocs dryRelease update checkFormat api assembleBenchmarkTestRelease assembleUiTestRelease assembleUiTestCriticalRelease createCoverageReports runUiTestCritical setupPython systemTest systemTestInteractive check preMerge publish
1+
.PHONY: all clean compile javadocs dryRelease update checkFormat api assembleBenchmarkTestRelease assembleUiTestRelease assembleUiTestCriticalRelease runUiTestCritical setupPython systemTest systemTestInteractive check preMerge publish
22

3-
all: stop clean javadocs compile createCoverageReports
3+
all: stop clean javadocs compile
44
assembleBenchmarks: assembleBenchmarkTestRelease
55
assembleUiTests: assembleUiTestRelease
6-
preMerge: check createCoverageReports
6+
preMerge: check
77
publish: clean dryRelease
88

99
# deep clean
@@ -51,13 +51,6 @@ assembleUiTestCriticalRelease:
5151
runUiTestCritical:
5252
./scripts/test-ui-critical.sh
5353

54-
# Create coverage reports
55-
# - Jacoco for Java & Android modules
56-
# - Kover for KMP modules e.g sentry-compose
57-
createCoverageReports:
58-
./gradlew jacocoTestReport
59-
./gradlew koverXmlReportRelease
60-
6154
# Create the Python virtual environment for system tests, and install the necessary dependencies
6255
setupPython:
6356
@test -d .venv || python3 -m venv .venv

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ _Bad software is everywhere, and we're tired of it. Sentry is on a mission to he
1313
Sentry SDK for Java and Android
1414
===========
1515
[![GH Workflow](https://img.shields.io/github/actions/workflow/status/getsentry/sentry-java/build.yml?branch=main)](https://github.com/getsentry/sentry-java/actions)
16-
[![codecov](https://codecov.io/gh/getsentry/sentry-java/branch/main/graph/badge.svg)](https://codecov.io/gh/getsentry/sentry-java)
1716
[![X Follow](https://img.shields.io/twitter/follow/sentry?label=sentry&style=social)](https://x.com/intent/follow?screen_name=sentry)
1817
[![Discord Chat](https://img.shields.io/discord/621778831602221064?logo=discord&logoColor=ffffff&color=7389D8)](https://discord.gg/PXa5Apfe7K)
1918

build.gradle.kts

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,15 @@ import com.vanniktech.maven.publish.JavadocJar
33
import com.vanniktech.maven.publish.MavenPublishBaseExtension
44
import groovy.util.Node
55
import io.gitlab.arturbosch.detekt.extensions.DetektExtension
6-
import kotlinx.kover.gradle.plugin.dsl.KoverReportExtension
76
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
87
import org.gradle.api.tasks.testing.logging.TestLogEvent
98

109
plugins {
1110
`java-library`
1211
alias(libs.plugins.spotless) apply false
13-
jacoco
1412
alias(libs.plugins.detekt)
1513
`maven-publish`
1614
alias(libs.plugins.binary.compatibility.validator)
17-
alias(libs.plugins.jacoco.android) apply false
18-
alias(libs.plugins.kover) apply false
1915
alias(libs.plugins.vanniktech.maven.publish) apply false
2016
alias(libs.plugins.kotlin.android) apply false
2117
alias(libs.plugins.kotlin.multiplatform) apply false
@@ -121,44 +117,6 @@ allprojects {
121117
subprojects {
122118
apply { plugin("io.sentry.spotless") }
123119

124-
val jacocoAndroidModules = listOf(
125-
"sentry-android-core",
126-
"sentry-android-fragment",
127-
"sentry-android-navigation",
128-
"sentry-android-ndk",
129-
"sentry-android-sqlite",
130-
"sentry-android-replay",
131-
"sentry-android-timber"
132-
)
133-
if (jacocoAndroidModules.contains(name)) {
134-
afterEvaluate {
135-
jacoco {
136-
toolVersion = "0.8.10"
137-
}
138-
139-
tasks.withType<Test>().configureEach {
140-
configure<JacocoTaskExtension> {
141-
isIncludeNoLocationClasses = true
142-
excludes = listOf("jdk.internal.*")
143-
}
144-
}
145-
}
146-
}
147-
148-
val koverKmpModules = listOf("sentry-compose")
149-
if (koverKmpModules.contains(name)) {
150-
afterEvaluate {
151-
configure<KoverReportExtension> {
152-
androidReports("release") {
153-
xml {
154-
// Change the report file name so the Codecov Github action can find it
155-
setReportFile(project.layout.buildDirectory.file("reports/kover/report.xml").get().asFile)
156-
}
157-
}
158-
}
159-
}
160-
}
161-
162120
plugins.withId(Config.QualityPlugins.detektPlugin) {
163121
configure<DetektExtension> {
164122
buildUponDefaultConfig = true

0 commit comments

Comments
 (0)