CI: add Android JVM unit test execution to PR workflow

オープン 初心者向け
#7,247 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
65/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
android, github-actions, kotlin
領域
ci-cd, mobile, testing

調査の方向性

.github/workflows/build-pr.yml と .github/workflows/eslint.yml を読み、既存の PR チェックと Android ワークフローの連鎖を追跡することから始めます。選択した PR ワークフロー構成に ./gradlew :app:testDebugUnitTest の実行を追加し、その後、Android JVM テストが実行され、テストが失敗するとワークフローも失敗することを確認します。

索引モデルが issue の本文から書いたものです。

説明

✅ tests 👷 ci type: feature

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.

主要言語
TypeScript
スター
2.4k
フォーク
1.5k
平均マージ
1日 15時間
マージ済み PR(30日)
29

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

RocketChat/Rocket.Chat.ReactNative のほかの issue

RocketChat/Rocket.Chat.ReactNative の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。