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

Reenable codecov reports and PR comments #2593

Merged
merged 8 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ buildscript {
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$navigationVersion"
classpath 'com.android.tools.build:gradle:8.3.2'
classpath 'com.google.gms:google-services:4.4.1'
classpath "com.pascalwelsch.gitversioner:gitversioner:0.5.0"
classpath "de.sharpmind:gitversioner:0.6.3"

// Performance Monitoring plugin: https://firebase.google.com/docs/perf-mon
classpath 'com.google.firebase:perf-plugin:1.4.2'
Expand Down Expand Up @@ -110,7 +110,7 @@ tasks.register('clean', Delete) {
}

// https://github.com/passsy/gradle-gitVersioner-plugin
apply plugin: "com.pascalwelsch.gitversioner"
apply plugin: "de.sharpmind.gitversioner"
gitVersioner {
baseBranch "master"
}
Expand All @@ -120,4 +120,4 @@ ext {
androidMinSdk = 24
androidTargetSdk = 33
jvmToolchainVersion = 17
}
}
8 changes: 3 additions & 5 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,10 @@ steps:
args:
- '-c'
- |
./gradlew -PdisablePreDex testDevStagingUnitTest --no-daemon 2> unit-test-logs.txt || echo "fail" > build-status.txt
./gradlew -PdisablePreDex testDevDebugUnitTest --no-daemon 2> unit-test-logs.txt || echo "fail" > build-status.txt
cat unit-test-logs.txt

if [[ "${_PUSH_TO_MASTER}" ]]; then
./gradlew jacocoTestStagingUnitTestReport --no-daemon
fi
./gradlew jacocoDevDebugUnitTestReport --no-daemon

- name: 'gcr.io/$PROJECT_ID/android:34'
id: &authenticate_gcloud 'Authorize gcloud'
Expand Down Expand Up @@ -205,7 +203,7 @@ steps:
- |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov --verbose upload-process --fail-on-error -t ${_CODECOV_TOKEN} -n 'service'-$BUILD_ID -F service -f coverage-service.xml
./codecov --verbose upload-process --fail-on-error -t ${_CODECOV_TOKEN} -n 'service'-$BUILD_ID -F service -f ground/build/reports/jacoco/jacocoDevDebugUnitTestReport/jacocoDevDebugUnitTestReport.xml

- name: 'gcr.io/$PROJECT_ID/android:base'
id: &compress_cache 'Compress gradle build cache'
Expand Down
2 changes: 1 addition & 1 deletion config/jacoco/jacoco.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ tasks.withType(Test).configureEach {
jacoco.excludes = ['jdk.internal.*']
}

tasks.register('jacocoTestStagingUnitTestReport', JacocoReport) {
tasks.register('jacocoDevDebugUnitTestReport', JacocoReport) {
dependsOn 'testDevDebugUnitTest'
group = "Reporting"
description = "Run tests and generate coverage reports"
Expand Down