Run the CpuAffinity JVM tests in the Android workflow

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

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

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

評価

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

調査の方向性

.github/workflows/android.ymlと既存のJVMテスト手順を読み、次にCpuAffinity.ktとCpuAffinityTest.ktを調べてGradleタスクを確認します。apps/mobile/androidから./gradlew :hermit-notifications:testDebugUnitTestを実行し、そのタスクを承認プロンプトのテストの後にワークフローの1ステップとして追加します。新しいステップが4つのテストに合格し、ワークフローの他の内容が変更されていなければ完了です。

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

説明

help wanted

Why

CpuAffinity.kt reads which cores Android lets Hermit use; the device-adaptive runtime plans the model's threads from it, and the Device lab reports it as allowedCpus. Its JVM tests exist, but no CI job runs them (ROADMAP.md, Now: the Device lab).

What to do

Today .github/workflows/android.yml runs the JVM tests of hermit-autofill and hermit-approval-key only.

  1. Read apps/mobile/modules/hermit-notifications/android/src/main/java/io/dojocoding/hermit/notifications/CpuAffinity.kt and its test, apps/mobile/modules/hermit-notifications/android/src/test/java/io/dojocoding/hermit/notifications/CpuAffinityTest.kt. apps/mobile/modules/hermit-notifications/android/build.gradle already declares JUnit for it.

  2. Build the app once as CONTRIBUTING.md says in "Build the Android app", then run the tests on your machine:

    (cd apps/mobile/android && ./gradlew :hermit-notifications:testDebugUnitTest)
    

    The name follows the two existing steps. If Gradle doesn't know it, ./gradlew projects lists the real one.

  3. In android.yml, add one step after "Approval prompt text from the signed payload on the JVM" that runs the same task with --no-daemon, in apps/mobile/android, named in the same style, for example "Allowed cores from Cpus_allowed_list on the JVM".

Done when

  • The Android workflow on your pull request runs the new step, and it passes with the four tests in CpuAffinityTest.
  • Nothing else in the workflow changes.

How to check

  • On your machine: the Gradle command above ends with BUILD SUCCESSFUL.
  • On GitHub: the Android workflow runs for pull requests that are ready for review (not drafts) and that touch apps/mobile/** or the workflow file. Mark yours ready once the step is in.

Keep in mind

  • AGENTS.md says to leave CI workflows alone unless the issue is about them. This one is: change only this step.
  • Keep actions pinned to commit SHAs and the token read-only. Add no secret and no permission.
  • Don't change CpuAffinity.kt here. If a test fails, open a bug report with what you saw.
主要言語
TypeScript
スター
11
フォーク
0
平均マージ
10分
マージ済み PR(30日)
6

環境構築

はじめの一歩

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

DojoCodingLabs/hermit のほかの issue

DojoCodingLabs/hermit の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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