Help us shape the future of Go! Take the 2026 Go Developer Survey

cireport

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package cireport renders a CI step's outcome as markdown for the workflow job summary, so a reader sees what was built (and what failed, and how long it took) on the run page instead of expanding a log.

Rendering (Report.Markdown) performs no I/O and is what the tests cover; delivery is left to the caller (the actions write it with githubactions.AddStepSummary). It is a package, not another action, because reporting is logic shared between Go callers in one module — an action would mean serialising results to JSON and parsing them back.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	Name     string
	Status   Status
	Detail   string        // artifacts, an error, or the reason for a skip
	Duration time.Duration // zero when not applicable
}

Item is one row: a component that was built, skipped or failed.

type Report

type Report struct {
	Title   string
	Lede    string // one line of context above the table
	Empty   string // shown instead of a table when there are no items
	Items   []Item
	Version string
	RunURL  string
}

Report is a step's outcome, ready to render.

func (Report) Failed

func (r Report) Failed() bool

Failed reports whether any item failed.

func (Report) Markdown

func (r Report) Markdown() string

Markdown renders the report. Durations are rounded to a tenth of a second: millisecond precision is noise that changes on every run.

type Status

type Status string

Status is the outcome of one item.

const (
	StatusOK      Status = "ok"
	StatusFailed  Status = "failed"
	StatusSkipped Status = "skipped"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL