Remove this ReportGenerator/.NET merge workaround after grcov ships
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 48/100
- issue の種類
- リファクタリング
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- github-actions, javascript
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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);
- 主要言語
- JavaScript
- スター
- 5
- フォーク
- 1
- 平均マージ
- 5時間 25分
- マージ済み PR(30日)
- 60
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
hoverkraft-tech/ci-github-common のほかの issue
-
bug need-fix
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
hoverkraft-tech/ci-github-common#694 ·
メンテナーはふだん 1 日以内に返信
-
bug need-fix
難易度 1/5 1時間未満 初心者へのやさしさ 76/100
hoverkraft-tech/ci-github-common#691 ·
メンテナーはふだん 1 日以内に返信
-
bug need-fix
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
hoverkraft-tech/ci-github-common#690 ·
メンテナーはふだん 1 日以内に返信
-
bug need-fix
難易度 1/5 1時間未満 初心者へのやさしさ 83/100
hoverkraft-tech/ci-github-common#688 ·
メンテナーはふだん 1 日以内に返信
-
bug need-fix
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
hoverkraft-tech/ci-github-common#693 ·
メンテナーはふだん 1 日以内に返信
hoverkraft-tech/ci-github-common の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 83/100
TheOdinProject/curriculum#31596 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
mailcow/mailcow-dockerized#7725 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 94/100
solana-foundation/solana-com#2579 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
vercel-labs/agent-skills#385 ·
-
documentation good first issue
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
danielcuesta007/skeptic#73 ·
メンテナーはふだん 1 日以内に返信