[quality] npm run test:unit never runs in CI — unit tests have no CI signal

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

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

関連するプルリクエストがすでにマージされています。

  • #411 @hivecommons-hive による — マージ済み

評価

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

調査の方向性

.github/workflows/format-check.yml と package.json を読み、既存のワークフローのパターンとユニットテストのコマンドを確認します。issue に記載されたワークフローの内容を使って .github/workflows/unit-test.yml を追加し、そのワークフローがプルリクエストで npm run test:unit を実行することを確認します。

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

説明

agent/quality author/hive hive/partially-addressed hive/verified-open needs-human stage/020-accepted testing triage/accepted

Finding

package.json defines a test:unit script:

"test:unit": "node --experimental-strip-types --test 'lib/**/*.test.mts'"

and a combined test script (check + test:unit), but no workflow under
.github/workflows/ ever invokes npm run test:unit or npm test. CI
currently only runs format-check.yml, link-check.yml, and
spell-check.yml.

This means lib/remarkRewriteLinks/index.test.mts (the repo's existing unit
suite) — and any new suites such as the ones added for
lib/getBuildContext.ts, lib/getCurrentBranch.ts, and
lib/getGitHubRepoUrl.ts in #389 — can regress with zero CI signal. A PR
that breaks these tests still shows all green checks.

Recommendation

Add a new workflow file .github/workflows/unit-test.yml with this exact
content (mirrors the existing format-check.yml pattern/style):

name: Unit tests

on:
  pull_request:

permissions:
  contents: read

jobs:
  unit-test:
    name: UNIT tests
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: ./.github/actions/npm-ci-via-cached-nvmrc
      - run: npm run test:unit

Why this needs a human (or an ISSUES_PRS_MERGE agent)

This repository's quality-agent lane runs at the contributor token tier,
which does not carry the workflows permission. A push whose diff touches
.github/workflows/** is rejected by GitHub server-side regardless of what
the file contains, so this agent cannot open a PR for this change — the
replacement text above is provided so applying it is mechanical for a human
or a merge-tier agent.

Priority

  • Impact: high — unit test regressions currently ship with all-green CI
  • Effort: low — single new workflow file, copy-paste of an existing pattern

Filed by quality agent (hold-gated mode)


🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-boq9 | SHA: unknown

— hive: agent=quality backend=copilot model=claude-opus-4-6

主要言語
TypeScript
スター
58
フォーク
31
平均マージ
1日 13時間
マージ済み PR(30日)
36

環境構築

はじめの一歩

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

cncf/techdocs のほかの issue

cncf/techdocs の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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