Remove this ReportGenerator/.NET merge workaround after grcov ships
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ó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- github-actions, javascript
Hướng nghiên cứu
Start with the coverage steps in actions/quality/publish-ci-reports/action.yml, especially the ReportGenerator merge and coverage upload matrix preparation. Read the linked grcov pull requests and check whether their changes are available in a release; then verify merged coverage and publication outputs against the report contract. Done means the workaround is removed and coverage publication still meets that contract.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
https://github\.com/mozilla/grcov/pull/1568 and
https://github\.com/mozilla/grcov/pull/1569, and merged coverage plus
publication outputs have been validated against the report contract.
v6.1.0
# Gather normalized reports, publish lint/test annotations, and prepare publication files.
# The [publication workflow](../../../.github/workflows/publish-ci-reports.md)
# owns coverage uploads and final summary/comment delivery.
# Every writable PR gets a compact overview. The comment reporters add category
# diagnostics; the Actions summary always retains all details.
# Check out the tested source before calling this action; the reusable workflow does so.
name: Publish CI reports
description: Prepare consolidated report files and coverage uploads, and publish lint/test annotations.
author: hoverkraft
branding:
icon: bar-chart-2
color: blue
inputs:
job-results:
description: JSON needs context used to display producer job outcomes.
required: true
lint-reporters:
description: Newline-separated `annotations`, `comment` and `code-scanning`. Comment adds lint diagnostics to the PR overview.
default: annotations
test-results-reporters:
description: Newline-separated `annotations` and `comment`. Comment adds test diagnostics to the PR overview.
default: annotations
test-coverage-reporters:
description: Newline-separated `auto`, `github`, `codecov`, `coveralls` and `comment`. Auto uses GitHub when available and falls back to the comment without an external provider. Comment explicitly includes coverage alongside any provider.
default: auto
outputs:
artifact-id:
description: Artifact containing report Markdown and prepared coverage files.
value: ${{ steps.upload.outputs.artifact-id }}
coverage-matrix:
description: JSON include matrix of selected coverage providers, languages, labels and artifact-relative files.
value: ${{ steps.coverage-plan.outputs.matrix || '{"include":[]}' }}
upload-coverage:
description: Whether the coverage matrix contains uploads.
value: ${{ steps.coverage-plan.outputs.upload || 'false' }}
summary-file:
description: Artifact-relative path to the rendered summary.
value: ${{ steps.render.outputs.summary-file }}
comment-file:
description: Artifact-relative path to the rendered PR comment.
value: ${{ steps.render.outputs.comment-file }}
comment:
description: Whether this run can publish its PR overview. The workflow checks freshness before publishing.
value: ${{ steps.collect.outputs.comment }}
header:
description: Stable comment identity for this workflow.
value: ${{ steps.collect.outputs.header }}
runs:
using: composite
steps:
- id: directory
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
const fs = require('node:fs');
const root = fs.mkdtempSync(require('node:path').join(process.env.RUNNER_TEMP, 'publish-ci-reports-'));
await io.mkdirP(root + '/incoming');
await io.mkdirP(root + '/publication');
core.setOutput('publication-path', root + '/publication');
core.setOutput('path', root);
- id: artifacts
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
const artifacts = await github.paginate(github.rest.actions.listWorkflowRunArtifacts, {...context.repo,run_id:context.runId,per_page:100});
core.setOutput('ids', artifacts.filter(artifact => artifact.name.startsWith('ci-report-') && !artifact.expired).map(artifact => artifact.id).join(','));
- id: download
if: steps.artifacts.outputs.ids != ''
uses: $/actions/download-artifact
with:
artifact-ids: ${{ steps.artifacts.outputs.ids }}
path: ${{ steps.directory.outputs.path }}/incoming
- id: collect
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
ACTION_PATH: ${{ github.action_path }}
REPORT_DIRECTORY: ${{ steps.directory.outputs.path }}
JOB_RESULTS: ${{ inputs.job-results }}
LINT: ${{ inputs.lint-reporters }}
TESTS: ${{ inputs.test-results-reporters }}
COVERAGE: ${{ inputs.test-coverage-reporters }}
with:
script: |
const { CollectReports } = await import(require('node:url').pathToFileURL(`${process.env.ACTION_PATH}/dist/index.js`));
await new CollectReports({core, github, context}).collect({directory:process.env.REPORT_DIRECTORY,jobResults:process.env.JOB_RESULTS,lint:process.env.LINT,tests:process.env.TESTS,coverage:process.env.COVERAGE});
- uses: reviewdog/action-setup@d8a7baabd7f3e8544ee4dbde3ee41d0011c3a93f # v1.5.0
if: steps.collect.outputs.lint == 'true'
with:
reviewdog_version: v0.21.3
- id: lint
if: steps.collect.outputs.lint == 'true'
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
ACTION_PATH: ${{ github.action_path }}
REPORT_DIRECTORY: ${{ steps.directory.outputs.path }}
with:
script: |
const { LintPublication } = await import(require('node:url').pathToFileURL(`${process.env.ACTION_PATH}/dist/index.js`));
await new LintPublication({core, exec}).lint(process.env.REPORT_DIRECTORY);
- name: Publish code scanning
id: code-scanning
if: ${{ !cancelled() && steps.lint.outputs.sarif != '' }}
uses: github/codeql-action/upload-sarif@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
with:
sarif_file: ${{ steps.lint.outputs.sarif }}
category: ci-lint
wait-for-processing: true
- id: tests
if: ${{ !cancelled() && steps.collect.outputs.tests == 'true' }}
uses: ctrf-io/github-test-reporter@c2e2997afb89a9a515d83121ce7499e272630446 # v1.4.0
with:
report-path: ${{ steps.directory.outputs.path }}/tests/*.json
summary-report: false
failed-folded-report: true
summary: false
pull-request: false
annotate: ${{ contains(inputs.test-results-reporters, 'annotations') }}
exit-on-no-files: true
exit-on-empty: true
env:
GITHUB_TOKEN: ${{ github.token }}
# FIXME: Remove this ReportGenerator/.NET merge workaround after grcov ships
# https://github.com/mozilla/grcov/pull/1568 and
# https://github.com/mozilla/grcov/pull/1569, and merged coverage plus
# publication outputs have been validated against the report contract.
- uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
if: ${{ !cancelled() && steps.collect.outputs.coverage != '' }}
with:
dotnet-version: "10.0.x"
- name: Merge coverage with ReportGenerator
id: coverage
if: ${{ !cancelled() && steps.collect.outputs.coverage != '' }}
uses: danielpalme/ReportGenerator-GitHub-Action@70c37c4d588cff5bf9cf190830c6f01dfcfb884b # 5.6.1
with:
reports: ${{ steps.collect.outputs.coverage }}
targetdir: ${{ steps.directory.outputs.publication-path }}/coverage
toolpath: ${{ runner.temp }}/reportgenerator-5.6.1
reporttypes: Cobertura;JsonSummary
- name: Prepare coverage upload matrix
id: coverage-plan
if: ${{ !cancelled() && steps.coverage.outcome == 'success' }}
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
ACTION_PATH: ${{ github.action_path }}
REPORT_DIRECTORY: ${{ steps.directory.outputs.path }}
PUBLICATION_DIRECTORY: ${{ steps.directory.outputs.publication-path }}
with:
script: |
const { CoveragePublication } = await import(require('node:url').pathToFileURL(`${process.env.ACTION_PATH}/dist/index.js`));
await new CoveragePublication({core, exec}).prepare({directory:process.env.REPORT_DIRECTORY,publicationDirectory:process.env.PUBLICATION_DIRECTORY,tool:`${process.env.RUNNER_TEMP}/reportgenerator-5.6.1/reportgenerator`});
- name: Render consolidated summary and comment
id: render
if: ${{ !cancelled() && steps.collect.outcome == 'success' }}
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
ACTION_PATH: ${{ github.action_path }}
REPORT_DIRECTORY: ${{ steps.directory.outputs.path }}
PUBLICATION_DIRECTORY: ${{ steps.directory.outputs.publication-path }}
TEST_SUMMARY: ${{ steps.tests.outputs.summary }}
# The CTRF report output can exceed the process environment size limit.
# Rendering only needs publication outcomes, not other step outputs.
PUBLICATION_STEPS: |
{
"lint": {"outcome": "${{ steps.lint.outcome }}"},
"code-scanning": {"outcome": "${{ steps.code-scanning.outcome }}"},
"tests": {"outcome": "${{ steps.tests.outcome }}"},
"coverage": {"outcome": "${{ steps.coverage.outcome }}"},
"coverage-plan": {"outcome": "${{ steps.coverage-plan.outcome }}"}
}
with:
script: |
const { ReportPresentation } = await import(require('node:url').pathToFileURL(`${process.env.ACTION_PATH}/dist/index.js`));
await new ReportPresentation({core, context}).render({directory:process.env.REPORT_DIRECTORY,publicationDirectory:process.env.PUBLICATION_DIRECTORY,template:`${process.env.ACTION_PATH}/report.md.hbs`,testSummary:process.env.TEST_SUMMARY,steps:JSON.parse(process.env.PUBLICATION_STEPS)});
- id: upload
if: ${{ !cancelled() && steps.collect.outcome == 'success' }}
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: ci-publication-${{ github.run_attempt }}
path: ${{ steps.directory.outputs.publication-path }}
if-no-files-found: error
retention-days: 7
- name: Clean publication workspace
if: ${{ always() && steps.directory.outputs.path != '' }}
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
REPORT_DIRECTORY: ${{ steps.directory.outputs.path }}
with:
script: |
await io.rmRF(process.env.REPORT_DIRECTORY);
- Ngôn ngữ chính
- JavaScript
- Star
- 5
- Fork
- 1
- Merge trung bình
- 5 giờ 25 phút
- Pull request đã merge (30 ngày)
- 60
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của hoverkraft-tech/ci-github-common
-
bug need-fix
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
hoverkraft-tech/ci-github-common#694 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug need-fix
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 76/100
hoverkraft-tech/ci-github-common#691 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug need-fix
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
hoverkraft-tech/ci-github-common#690 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug need-fix
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 83/100
hoverkraft-tech/ci-github-common#688 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug need-fix
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
hoverkraft-tech/ci-github-common#693 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của hoverkraft-tech/ci-github-common
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 83/100
TheOdinProject/curriculum#31596 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
mailcow/mailcow-dockerized#7725 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 94/100
solana-foundation/solana-com#2579 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 85/100
vercel-labs/agent-skills#385 ·
-
documentation good first issue
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
danielcuesta007/skeptic#73 ·
Maintainer thường phản hồi trong vòng 1 ngày