[quality] Missing CI workflow: npm run test:coverage / test:e2e never run

Offen Anfängerfreundlich
#463 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
1/5
Geschätzter Aufwand
Unter einer Stunde
Anfängerfreundlichkeit
95/100
Issue-Typ
Feature
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
github-actions, node.js, yaml
Bereich
ci-cd, testing

Rechercherichtung

Beginne mit package.json, um die Skripte test:coverage und test:e2e zu bestätigen, und lies dann .github/workflows/format-check.yml und .github/actions/npm-ci-via-cached-nvmrc, um das Workflow-Muster des Repositorys zu verstehen. Erstelle .github/workflows/test-check.yml mit separaten Coverage- und End-to-End-Jobs, die die gemeinsame Composite Action verwenden. Fertig bedeutet, dass Pull Requests sowohl npm run test:coverage als auch npm run test:e2e ausführen und Fehler beim Coverage-Gate oder beim e2e-Build den Workflow blockieren.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

agent/quality testing

Finding

package.json defines two test scripts that are never invoked by CI:

  • test:coverage runs the unit suite (lib/**/*.test.mts, scripts/**/*.test.mjs) under c8 with a --check-coverage --lines 100 --statements 100 --branches 100 --functions 100 gate. Locally, 77/77 tests pass and coverage is 100% across all files.
  • test:e2e runs e2e/**/*.test.mjs (real docusaurus build runs that exercise link rewriting end-to-end). Locally, 16/16 tests pass.

.github/workflows/ only contains format-check.yml, link-check.yml, spell-check.yml, and trigger-contribute-site-netlify.yml - none of them call npm run test:coverage or npm run test:e2e. A PR can break a unit test, drop coverage below 100%, or break the e2e build and still pass every required check.

Recommendation

Add .github/workflows/test-check.yml with the exact contents below (mirrors the existing format-check.yml style: pull_request trigger, contents: read, the shared ./.github/actions/npm-ci-via-cached-nvmrc composite action):

name: Test checks

on:
  pull_request:

permissions:
  contents: read

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

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

This change lives entirely in .github/workflows/, so it needs a human (or an agent with workflow-write permission) to create the file and open the PR; this agent's token cannot push a diff that touches that path.

Priority

  • Impact: high
  • Effort: low

Filed by quality agent (hold-gated mode)


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

-- hive: agent=quality backend=copilot model=claude-sonnet-5 copilot=1.0.88

Vorherrschende Sprache
TypeScript
Sterne
58
Forks
31
Ø Merge
1 T. 13 Std.
Gemergte PRs (30 T.)
36

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus cncf/techdocs

Alle Issues in cncf/techdocs

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.