Documentation
¶
Overview ¶
Package gates is "ypy ci": the checks every change passes before it is pushed. Each gate is a small function with a name; "ypy ci" runs them in order and prints a summary. The same command runs in the GitHub workflow.
Index ¶
Constants ¶
const RequireFirefoxEnv = "YPY_REQUIRE_FIREFOX"
RequireFirefoxEnv, when set to 1, makes a missing Firefox or geckodriver fail the browser gate instead of falling back to Chrome. The GitHub workflow sets it.
Variables ¶
This section is empty.
Functions ¶
func ResolveBrowsers ¶
func ResolveBrowsers(requested string, firefoxReady bool, why string, require bool) (list, warning string, err error)
ResolveBrowsers turns the --browsers option into the list the browser gate runs.
Without an explicit list the default is chrome and, when Firefox can be driven, firefox. When it cannot: with require it is an error, otherwise the list is chrome and the warning says why Firefox was left out. An explicit list is used as given, except that with require the list must include firefox and Firefox must be ready.
Types ¶
type Env ¶
type Env struct {
Root string
Out io.Writer
Err io.Writer
IO cli.IO
// Browser options, passed to the "browser" and "e2e" gates.
Browsers string
ChromePath string
Port int
Strict bool
}
Env is what a gate may use.