ci

package
v0.25.2 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoProvider = &fakePipeline{CreatedAt: time.Now()}

NoProvider represents a NO-OP provider for cases where no supported CI provider was detected.

Functions

func IsAvailable

func IsAvailable() bool

IsAvailable detects whether this code is executed inside a CI environment

func RegisterProvider added in v0.13.0

func RegisterProvider(name string, available func() bool, create func() Provider)

RegisterProvider registers a "create" function that returns a new instance of the given Provider function. The "available" function should determine whether this Provider is actually available in the current environment.

Types

type Provider added in v0.13.0

type Provider interface {
	BuildID() string
	// SetBuildID overrides the CI provided build ID.
	SetBuildID(id string)
}

Provider represents the CI provider.

func Detect added in v0.13.0

func Detect() Provider

Detect detects which CI environment this code is executed in. It can only find the providers that were previous registered by calling RegisterProvider(). Returns NoProvider if no supported CI provider could be detected.

type Runner deprecated

type Runner struct {
	runner.BaseRunner
	CIProvider Provider
}

Runner represents the CI implementation of a runner.Testrunner.

Deprecated: There are no more specific runners for running in CI.

func NewRunner deprecated

NewRunner creates a new Runner instance.

Deprecated: Use the appropriate framework specific runner instead.

func (*Runner) RunProject added in v0.12.1

func (r *Runner) RunProject() (int, error)

RunProject runs the tests defined in config.Project.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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