RocketChat / RocketChat/Rocket.Chat.ReactNative
CI: add Android JVM unit test execution to PR workflow
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 1.5k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 90
Description
Problem
The PR CI workflow (.github/workflows/build-pr.yml → .github/workflows/eslint.yml) runs yarn lint and yarn test --runInBand (Jest), then chains the Android/iOS build workflows.
It does not execute Android JVM unit tests (./gradlew :app:testDebugUnitTest). The build-android workflow runs assembleRelease, which catches compile errors but doesn't execute the test sources under android/app/src/test/.
This means tests like MediaCallsAnswerRequestTest.kt (added in https://github.com/RocketChat/Rocket.Chat.ReactNative/pull/7245), DDPClientTest.kt, MediaCallsRegistryTest.kt, etc. only run when a developer remembers to invoke them locally.
Suggested fix
Add a ./gradlew :app:testDebugUnitTest step to the PR workflow — either:
- As a new step in
eslint.ymlafter the Jest run, or - As a separate
android-unit-tests.ymlworkflow gated onpull_request.
Option 2 keeps the JS+TS lint/test job lean and lets Android JVM tests run in parallel.
Why now
The release-readiness queue added several Android JVM test classes (#7245 has 276 lines of MockWebServer coverage). Without CI execution, regressions in the timeout / dedupe / dispatch logic land silently. Filing as a follow-up so the test suite gets actual gating value.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading .github/workflows/build-pr.yml and .github/workflows/eslint.yml to trace the existing PR checks and Android workflow chaining. Add execution of ./gradlew :app:testDebugUnitTest in the selected PR workflow arrangement, then verify that the Android JVM tests run and that a failing test causes the workflow to fail.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, github-actions, kotlin
- Domain
- ci-cd, mobile, testing
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100