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

Đang mở Phù hợp với người mới
#463 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
95/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github-actions, node.js, yaml
Lĩnh vực
ci-cd, testing

Hướng nghiên cứu

Bắt đầu với package.json để xác nhận các script test:coverage và test:e2e, sau đó đọc .github/workflows/format-check.yml và .github/actions/npm-ci-via-cached-nvmrc để hiểu mẫu workflow của repository. Tạo .github/workflows/test-check.yml với các job coverage và end-to-end riêng biệt, sử dụng shared composite action. Hoàn tất nghĩa là pull request chạy cả npm run test:coverage và npm run test:e2e, đồng thời lỗi coverage gate hoặc build e2e sẽ chặn workflow.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
TypeScript
Star
58
Fork
31
Merge trung bình
1 ngày 13 giờ
Pull request đã merge (30 ngày)
36

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của cncf/techdocs

Tất cả issue của cncf/techdocs

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.