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

Test and verify coverage only on debug variant #2556

Merged
merged 4 commits into from
Mar 15, 2024

Conversation

jmartinesp
Copy link
Contributor

@jmartinesp jmartinesp commented Mar 15, 2024

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Only test and verify coverage on debug variant.

Motivation and context

Checklist

Copy link
Contributor

github-actions bot commented Mar 15, 2024

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/YscDUu

Copy link

codecov bot commented Mar 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.16%. Comparing base (694f551) to head (6a07aee).
Report is 14 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2556      +/-   ##
===========================================
- Coverage    73.18%   73.16%   -0.02%     
===========================================
  Files         1407     1407              
  Lines        34062    34062              
  Branches      6609     6609              
===========================================
- Hits         24927    24921       -6     
- Misses        5685     5689       +4     
- Partials      3450     3452       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jmartinesp jmartinesp marked this pull request as ready for review March 15, 2024 11:27
@jmartinesp jmartinesp requested a review from a team as a code owner March 15, 2024 11:27
@jmartinesp jmartinesp requested review from bmarty and removed request for a team March 15, 2024 11:27
@jmartinesp
Copy link
Contributor Author

I don't see a good way to keep the coverage, since the missing tests can only be run on release mode given our inline value class implementations.

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, some small remarks.

- name: ⚙️ Run unit tests, debug and release
run: ./gradlew test $CI_GRADLE_ARG_PROPERTIES
- name: ⚙️ Run unit tests for debug variant
run: ./gradlew testDebugUnitTest $CI_GRADLE_ARG_PROPERTIES
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am wondering if ./gradlew testGplayDebugUnitTest would be enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably. I kept it like that in case we add some fdroid only tests in the future. I'll change it and see if anything changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, that will only run :app:testGplayDebugUnitTest according to --dry-run, since the flavor only exists in that module.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK 👍

@@ -189,7 +188,7 @@ androidComponents {
val abiCode = abiVersionCodes[name] ?: 0
// Assigns the new version code to output.versionCode, which changes the version code
// for only the output APK, not for the variant itself.
output.versionCode.set((output.versionCode.get() ?: 0) * 10 + abiCode)
output.versionCode.set((output.versionCode.orNull ?: 0) * 10 + abiCode)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -215,26 +214,6 @@ knit {
}
}

val ciBuildProperty = "ci-build"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter ci-build is also used in nightlyReports.yml, I think it can be removed from this file too.

Copy link

sonarcloud bot commented Mar 15, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@jmartinesp jmartinesp merged commit 810c0ed into develop Mar 15, 2024
15 of 16 checks passed
@jmartinesp jmartinesp deleted the misc/jme/test-and-check-only-debug-variant branch March 15, 2024 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants