RocketChat / RocketChat/Rocket.Chat.ReactNative

CI: add Android JVM unit test execution to PR workflow

Open Beginner friendly
#7,247 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

✅ tests 👷 ci type: feature
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:

  1. As a new step in eslint.yml after the Jest run, or
  2. As a separate android-unit-tests.yml workflow gated on pull_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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.