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

Aberta Para iniciantes
#463 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
1/5
Tempo estimado
Menos de uma hora
Facilidade para iniciantes
95/100
Tipo de issue
Funcionalidade
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
github-actions, node.js, yaml
Domínio
ci-cd, testing

Direção de pesquisa

Comece com package.json para confirmar os scripts test:coverage e test:e2e e depois leia .github/workflows/format-check.yml e .github/actions/npm-ci-via-cached-nvmrc para entender o padrão de workflow do repositório. Crie .github/workflows/test-check.yml com jobs separados de coverage e end-to-end usando a composite action compartilhada. Concluído significa que os pull requests executam tanto npm run test:coverage quanto npm run test:e2e, e que falhas no coverage gate ou na compilação e2e bloqueiam o workflow.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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

Linguagem predominante
TypeScript
Estrelas
58
Forks
31
Merge médio
1d 13h
PRs com merge (30d)
36

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de cncf/techdocs

Todas as issues de cncf/techdocs

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.