config

package
v0.39.2 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Examples

Constants

View Source
const (
	WhenFail   when = "fail"
	WhenPass   when = "pass"
	WhenNever  when = "never"
	WhenAlways when = "always"
)

These conditions indicate when artifacts are to be downloaded.

View Source
const (
	KindCypress    = "cypress"
	KindPuppeteer  = "puppeteer"
	KindPlaywright = "playwright"
	KindTestcafe   = "testcafe"
	KindEspresso   = "espresso"
)

Kind* contains referenced config kinds

View Source
const (
	VersionV1Alpha = "v1alpha"
)

Version* contains referenced config version

Variables

This section is empty.

Functions

func StandardizeVersionFormat

func StandardizeVersionFormat(version string) string

StandardizeVersionFormat remove the leading v in version to ensure reliable comparisons.

Types

type ArtifactDownload added in v0.36.0

type ArtifactDownload struct {
	Match     []string `yaml:"match,omitempty" json:"match"`
	When      when     `yaml:"when,omitempty" json:"when"`
	Directory string   `yaml:"directory,omitempty" json:"directory"`
}

ArtifactDownload represents the test artifacts configuration.

type Artifacts added in v0.36.0

type Artifacts struct {
	Download ArtifactDownload `yaml:"download,omitempty" json:"download"`
}

Artifacts represents the test artifacts configuration.

type Defaults added in v0.37.0

type Defaults struct {
	Mode string `yaml:"mode,omitempty" json:"mode"`
}

Defaults represents default suite settings.

type Device added in v0.36.0

type Device struct {
	ID               string   `yaml:"id,omitempty" json:"id"`
	Name             string   `yaml:"name,omitempty" json:"name"`
	Orientation      string   `yaml:"orientation,omitempty" json:"orientation"`
	PlatformVersions []string `yaml:"platformVersions,omitempty" json:"platformVersions"`
	PlatformName     string   `yaml:"platformName,omitempty" json:"platformName"`
}

Device represents the Android device configuration.

type Docker

type Docker struct {
	FileTransfer DockerFileMode `yaml:"fileTransfer,omitempty" json:"fileTransfer"`
	Image        string         `yaml:"image,omitempty" json:"image"`
}

Docker represents docker settings.

type DockerFileMode

type DockerFileMode string

DockerFileMode represent the file providing method

const (
	DockerFileMount DockerFileMode = "mount"
	DockerFileCopy  DockerFileMode = "copy"
)

DockerFile* represent the different modes

type Metadata

type Metadata struct {
	Name  string   `yaml:"name" json:"name"`
	Tags  []string `yaml:"tags" json:"tags,omitempty"`
	Build string   `yaml:"build" json:"build"`
}

Metadata describes job metadata

func (*Metadata) ExpandEnv

func (m *Metadata) ExpandEnv()

ExpandEnv expands environment variables inside metadata fields.

Example
os.Setenv("tname", "Envy")
os.Setenv("ttag", "xp1")
os.Setenv("tbuild", "Bob")

m := Metadata{
	Name:  "Test $tname",
	Tags:  []string{"$ttag"},
	Build: "Build $tbuild",
}

m.ExpandEnv()

fmt.Println(m)
Output:

{Test Envy [xp1] Build Bob}

type Npm

type Npm struct {
	Registry string            `yaml:"registry,omitempty" json:"registry,omitempty"`
	Packages map[string]string `yaml:"packages,omitempty" json:"packages"`
}

Npm represents the npm settings

type SauceConfig

type SauceConfig struct {
	Region      string            `yaml:"region,omitempty" json:"region"`
	Metadata    Metadata          `yaml:"metadata,omitempty" json:"metadata"`
	Tunnel      Tunnel            `yaml:"tunnel,omitempty" json:"tunnel,omitempty"`
	Concurrency int               `yaml:"concurrency,omitempty" json:"concurrency,omitempty"`
	Sauceignore string            `yaml:"sauceignore,omitempty" json:"sauceignore,omitempty"`
	Experiments map[string]string `yaml:"experiments,omitempty" json:"experiments,omitempty"`
}

SauceConfig represents sauce labs related settings.

type Tunnel

type Tunnel struct {
	ID     string `yaml:"id,omitempty" json:"id"`
	Parent string `yaml:"parent,omitempty" json:"parent,omitempty"`
}

Tunnel represents a sauce labs tunnel.

type TypeDef

type TypeDef struct {
	APIVersion string `yaml:"apiVersion,omitempty"`
	Kind       string `yaml:"kind,omitempty"`
}

TypeDef represents the type definition of the config.

func Describe

func Describe(cfgPath string) (TypeDef, error)

Describe returns a description of the given config that is cfgPath.

Jump to

Keyboard shortcuts

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