CI: add Android JVM unit test execution to PR workflow

Aperta Adatta ai principianti
#7,247 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
65/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
android, github-actions, kotlin
Ambito
ci-cd, mobile, testing

Direzione di ricerca

Inizia leggendo .github/workflows/build-pr.yml e .github/workflows/eslint.yml per seguire i controlli PR esistenti e il concatenamento dei workflow Android. Aggiungi l’esecuzione di ./gradlew :app:testDebugUnitTest nella disposizione selezionata dei workflow PR, quindi verifica che i test JVM Android vengano eseguiti e che un test non superato faccia fallire il workflow.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

✅ 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.

Lingua principale
TypeScript
Stelle
2.4k
Fork
1.5k
Merge medio
1g 15h
PR unite (30g)
29

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di RocketChat/Rocket.Chat.ReactNative

Tutte le issue di RocketChat/Rocket.Chat.ReactNative

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.