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

Merge unit, screenshot tests and coverage in a single CI call #3593

Merged

Conversation

jmartinesp
Copy link
Member

@jmartinesp jmartinesp commented Oct 3, 2024

Content

In the CI, merge the unit tests, screenshot tests and coverage checks in the same Gradle command to avoid having to check for build/config caches between tasks.

Motivation and context

Reduce test job times in the CI, since they're getting quite high.

Tests

Check if CI times are lower.

Checklist

  • Changes have been tested on an Android device or Android emulator with API 23
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • Pull request includes a sign off
  • You've made a self review of your PR

@jmartinesp jmartinesp added the PR-Build For changes related to build, tools, CI/CD label Oct 3, 2024
Copy link
Contributor

github-actions bot commented Oct 3, 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/7WLJqz

Copy link

sonarcloud bot commented Oct 3, 2024

Copy link

codecov bot commented Oct 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.45%. Comparing base (f8fa218) to head (ab1406a).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3593      +/-   ##
===========================================
+ Coverage    81.71%   82.45%   +0.73%     
===========================================
  Files         1751     1746       -5     
  Lines        41936    42110     +174     
  Branches      5071     5037      -34     
===========================================
+ Hits         34269    34722     +453     
+ Misses        5893     5618     -275     
+ Partials      1774     1770       -4     

☔ 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 October 3, 2024 10:53
@jmartinesp jmartinesp requested a review from a team as a code owner October 3, 2024 10:53
@jmartinesp jmartinesp requested review from ganfra and removed request for a team October 3, 2024 10:53
@jmartinesp
Copy link
Member Author

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.45%. Comparing base (f8fa218) to head (ab1406a).

Additional details and impacted files
☔ View full report in Codecov by Sentry. 📢 Have feedback on the report? Share it here.

Code coverage is suddenly back and that scares me.

- name: 📈Generate kover report and verify coverage
run: ./gradlew :app:koverXmlReportGplayDebug :app:koverHtmlReportGplayDebug :app:koverVerifyAll $CI_GRADLE_ARG_PROPERTIES
- name: ⚙️ Check coverage for debug variant (includes unit & screenshot tests)
run: ./gradlew :tests:uitests:verifyPaparazziDebug :app:koverXmlReportGplayDebug :app:koverHtmlReportGplayDebug :app:koverVerifyAll $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 don't see testDebugUnitTest inside?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's not needed, the kover tasks already run them. You can check the logs of the GH actions to confirm.

Copy link
Member

Choose a reason for hiding this comment

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

(it was a good remark @ganfra, added again testDebugUnitTest in #3617)

@jmartinesp jmartinesp merged commit 4d6b37f into develop Oct 3, 2024
26 checks passed
@jmartinesp jmartinesp deleted the test/jme/run-unit-and-screenshot-tests-in-same-command branch October 3, 2024 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Build For changes related to build, tools, CI/CD
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants