env

package
v0.57.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EnvironmentForgejoDev is the ENVIRONMENT value that selects the
	// Forgejo drivers.
	EnvironmentForgejoDev = "forgejo-dev"
	// SCMForgejo is the BEHAVIOUR_SCM value of the Forgejo SCM driver.
	SCMForgejo = "forgejo"
	// CIForgejoActions is the BEHAVIOUR_CI value of the Forgejo Actions
	// CI driver.
	CIForgejoActions = "forgejoactions"
)

Driver selections and the environment that requires them.

Variables

This section is empty.

Functions

This section is empty.

Types

type RunnerConfig

type RunnerConfig struct {
	SCM         string
	CI          string
	InstallMode string
	// Environment is the mint/infra target the suite is talking to
	// (`dev`, `stage`, or `forgejo-dev`), from ENVIRONMENT. Empty
	// defaults to `dev` so local `make behaviour-test` works without
	// setting it. CI sets this to match the GitHub Environment on the
	// behaviour job. `forgejo-dev` selects the Forgejo SCM, CI, and
	// install drivers.
	Environment string

	// Capabilities lists environment capabilities the runner declares,
	// from the comma-separated BEHAVIOUR_CAPABILITIES env var. Scenarios
	// tagged @requires:capability:<name> are skipped unless <name> is
	// declared — the gate for coverage of behavior that only exists past
	// a certain dependency version (e.g. an agents-repo release).
	Capabilities []string
}

RunnerConfig holds behaviour test runner configuration from environment.

func LoadRunnerConfig

func LoadRunnerConfig() RunnerConfig

LoadRunnerConfig reads the runner configuration from the environment. BEHAVIOUR_SCM and BEHAVIOUR_CI default to the Forgejo drivers when ENVIRONMENT=forgejo-dev and to the GitHub drivers otherwise; explicit values are kept as given, and Validate rejects a mix.

func (RunnerConfig) HasCapability added in v0.35.1

func (c RunnerConfig) HasCapability(name string) bool

HasCapability reports whether the runner declared the named capability.

func (RunnerConfig) Validate

func (c RunnerConfig) Validate() error

Jump to

Keyboard shortcuts

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