CI: add Android JVM unit test execution to PR workflow

Đang mở Phù hợp với người mới
#7,247 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
65/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
android, github-actions, kotlin
Lĩnh vực
ci-cd, mobile, testing

Hướng nghiên cứu

Bắt đầu bằng cách đọc .github/workflows/build-pr.yml và .github/workflows/eslint.yml để theo dõi các bước kiểm tra PR hiện có và chuỗi liên kết workflow Android. Thêm việc chạy ./gradlew :app:testDebugUnitTest vào cách sắp xếp workflow PR được chọn, sau đó xác minh rằng các bài kiểm thử JVM của Android được chạy và một bài kiểm thử thất bại sẽ khiến workflow thất bại.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
TypeScript
Star
2.4k
Fork
1.5k
Merge trung bình
1 ngày 15 giờ
Pull request đã merge (30 ngày)
29

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của RocketChat/Rocket.Chat.ReactNative

Tất cả issue của RocketChat/Rocket.Chat.ReactNative

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.