report

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: MIT Imports: 17 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiffReport added in v0.20.0

type DiffReport struct {
	RepositoryA       string                 `json:"repository_a"`
	RepositoryB       string                 `json:"repository_b"`
	RefA              string                 `json:"ref_a"`
	RefB              string                 `json:"ref_b"`
	CommitA           string                 `json:"commit_a"`
	CommitB           string                 `json:"commit_b"`
	Coverage          *coverage.DiffCoverage `json:"coverage,omitempty"`
	CodeToTestRatio   *ratio.DiffRatio       `json:"code_to_test_ratio,omitempty"`
	TestExecutionTime *DiffTestExecutionTime `json:"test_execution_time,omitempty"`
	TimestampA        time.Time              `json:"timestamp_a"`
	TimestampB        time.Time              `json:"timestamp_b"`
	ReportA           *Report                `json:"-"`
	ReportB           *Report                `json:"-"`
}

func (*DiffReport) FileCoveagesTable added in v0.20.0

func (d *DiffReport) FileCoveagesTable(files []*gh.PullRequestFile) string

func (*DiffReport) Out added in v0.20.0

func (d *DiffReport) Out(w io.Writer)

func (*DiffReport) Table added in v0.20.0

func (d *DiffReport) Table() string

type DiffTestExecutionTime added in v0.20.0

type DiffTestExecutionTime struct {
	A                  *float64 `json:"a"`
	B                  *float64 `json:"b"`
	Diff               float64  `json:"diff"`
	TestExecutionTimeA *float64 `json:"-"`
	TestExecutionTimeB *float64 `json:"-"`
}

type Report

type Report struct {
	Repository        string             `json:"repository"`
	Ref               string             `json:"ref"`
	Commit            string             `json:"commit"`
	Coverage          *coverage.Coverage `json:"coverage,omitempty"`
	CodeToTestRatio   *ratio.Ratio       `json:"code_to_test_ratio,omitempty"`
	TestExecutionTime *float64           `json:"test_execution_time,omitempty"`
	Timestamp         time.Time          `json:"timestamp"`
	// contains filtered or unexported fields
}

func New

func New() (*Report, error)

func (*Report) Bytes added in v0.13.0

func (r *Report) Bytes() []byte

func (*Report) CodeToTestRatioRatio added in v0.6.0

func (r *Report) CodeToTestRatioRatio() float64

func (*Report) Compare added in v0.20.0

func (r *Report) Compare(r2 *Report) *DiffReport

func (*Report) CountMeasured added in v0.12.0

func (r *Report) CountMeasured() int

func (*Report) CoveragePercent

func (r *Report) CoveragePercent() float64

func (*Report) FileCoveagesTable added in v0.19.0

func (r *Report) FileCoveagesTable(files []*gh.PullRequestFile) string

func (*Report) IsMeasuredCodeToTestRatio added in v0.12.0

func (r *Report) IsMeasuredCodeToTestRatio() bool

func (*Report) IsMeasuredCoverage added in v0.12.0

func (r *Report) IsMeasuredCoverage() bool

func (*Report) IsMeasuredTestExecutionTime added in v0.12.0

func (r *Report) IsMeasuredTestExecutionTime() bool

func (*Report) MeasureCodeToTestRatio added in v0.6.0

func (r *Report) MeasureCodeToTestRatio(code, test []string) error

func (*Report) MeasureCoverage

func (r *Report) MeasureCoverage(path string) error

func (*Report) MeasureTestExecutionTime added in v0.7.0

func (r *Report) MeasureTestExecutionTime(ctx context.Context, stepNames []string) error

func (*Report) Out added in v0.20.0

func (r *Report) Out(w io.Writer) error

func (*Report) String

func (r *Report) String() string

func (*Report) Table added in v0.11.0

func (r *Report) Table() string

func (*Report) Validate added in v0.2.0

func (r *Report) Validate() error

Jump to

Keyboard shortcuts

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