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

Aperta Adatta ai principianti
#463 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
95/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
github-actions, node.js, yaml
Ambito
ci-cd, testing

Direzione di ricerca

Inizia da package.json per confermare gli script test:coverage e test:e2e, quindi leggi .github/workflows/format-check.yml e .github/actions/npm-ci-via-cached-nvmrc per il pattern di workflow del repository. Crea .github/workflows/test-check.yml con job separati per coverage ed end-to-end che utilizzino la composite action condivisa. Fatto significa che le pull request eseguono sia npm run test:coverage sia npm run test:e2e, e che i fallimenti del coverage gate o della build e2e bloccano il workflow.

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

Descrizione

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

Lingua principale
TypeScript
Stelle
58
Fork
31
Merge medio
1g 13h
PR unite (30g)
36

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 cncf/techdocs

Tutte le issue di cncf/techdocs

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.