Something went wrong. Try again.
A collection of +180 reusable WebAssembly modules for building composable CI/CD pipelines with FluentCI fluentci.io/modules
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112-- Generated by Gleam CI helpers.module CI.Component (run, version, setup, test, list, install, install_deps) where
import Preludeimport CI.Contract as Contractimport Data.Maybe (Maybe)import Effect (Effect)import CI.ModuleDependencies as Dependenciesimport CI.CLI as Native
-- | Execute arbitrary literal CLI arguments.-- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".".-- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist.-- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool.-- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000.-- | @param artifacts Output artifacts to collect as NAME=PATH entries; names must be unique.-- | @param arguments Literal native CLI argument tokens, passed without shell expansion.run :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe (Array String), arguments :: Array String } -> Effect Contract.ExecutionResultrun args = do json <- Contract.cliInput (Contract.encodeInput args) Native.executeWithSetup Dependencies.ensureFor "playwright" "run" json
-- | Print the CLI version.-- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".".-- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist.-- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool.-- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000.-- | @param artifacts Output artifacts to collect as NAME=PATH entries; names must be unique.version :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe (Array String) } -> Effect Contract.ExecutionResultversion args = do json <- Contract.cliInput (Contract.encodeInput args) Native.executeWithSetup Dependencies.ensureFor "playwright" "version" json
-- | Install the test framework in project using Bun. Browser binaries are installed separately with install.-- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".".-- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist.-- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool.-- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000.-- | @param artifacts Output artifacts to collect as NAME=PATH entries; names must be unique.-- | @param version Framework version or release tag to install with Bun. Default: "latest".setup :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe (Array String), version :: Maybe String } -> Effect Contract.ExecutionResultsetup args = do json <- Contract.cliInput (Contract.encodeInput args) Native.executeWithSetup Dependencies.ensureFor "playwright" "setup" json
-- | Run Playwright Test headlessly, optionally filtering projects and tests.-- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".".-- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist.-- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool.-- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000.-- | @param artifacts Output artifacts to collect as NAME=PATH entries; names must be unique.-- | @param config Named configuration selected by the native tool.-- | @param testProject Test Project supplied to the playwright test operation.-- | @param grep Grep supplied to the playwright test operation.-- | @param grepInvert Grep Invert supplied to the playwright test operation.-- | @param workers Workers supplied to the playwright test operation.-- | @param reporter Reporter supplied to the playwright test operation.-- | @param output Destination path for generated packages.-- | @param retries Retries supplied to the playwright test operation.-- | @param shard Shard supplied to the playwright test operation.-- | @param forbidOnly Forbid Only supplied to the playwright test operation.-- | @param failOnFlakyTests Fail On Flaky Tests supplied to the playwright test operation.-- | @param updateSnapshots Update Snapshots supplied to the playwright test operation.-- | @param tests Tests supplied to the playwright test operation. Default: [].test :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe (Array String), config :: Maybe String, testProject :: Maybe (Array String), grep :: Maybe String, grepInvert :: Maybe String, workers :: Maybe Int, reporter :: Maybe String, output :: Maybe String, retries :: Maybe Int, shard :: Maybe String, forbidOnly :: Maybe Boolean, failOnFlakyTests :: Maybe Boolean, updateSnapshots :: Maybe Boolean, tests :: Maybe (Array String) } -> Effect Contract.ExecutionResulttest args = do json <- Contract.cliInput (Contract.encodeInput args) Native.executeWithSetup Dependencies.ensureFor "playwright" "test" json
-- | List matching tests without launching browsers.-- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".".-- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist.-- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool.-- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000.-- | @param artifacts Output artifacts to collect as NAME=PATH entries; names must be unique.-- | @param config Named configuration selected by the native tool.-- | @param testProject Test Project supplied to the playwright list operation.-- | @param grep Grep supplied to the playwright list operation.-- | @param grepInvert Grep Invert supplied to the playwright list operation.-- | @param workers Workers supplied to the playwright list operation.-- | @param tests Tests supplied to the playwright list operation. Default: [].list :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe (Array String), config :: Maybe String, testProject :: Maybe (Array String), grep :: Maybe String, grepInvert :: Maybe String, workers :: Maybe Int, tests :: Maybe (Array String) } -> Effect Contract.ExecutionResultlist args = do json <- Contract.cliInput (Contract.encodeInput args) Native.executeWithSetup Dependencies.ensureFor "playwright" "list" json
-- | Install browser binaries matching the installed Playwright package.-- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".".-- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist.-- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool.-- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000.-- | @param artifacts Output artifacts to collect as NAME=PATH entries; names must be unique.-- | @param withDeps With Deps supplied to the playwright install operation.-- | @param onlyShell Only Shell supplied to the playwright install operation.-- | @param browsers Browsers supplied to the playwright install operation. Default: [].install :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe (Array String), withDeps :: Maybe Boolean, onlyShell :: Maybe Boolean, browsers :: Maybe (Array String) } -> Effect Contract.ExecutionResultinstall args = do json <- Contract.cliInput (Contract.encodeInput args) Native.executeWithSetup Dependencies.ensureFor "playwright" "install" json
-- | Install operating-system browser dependencies; may require elevated privileges.-- | @param project Working directory containing the source checkout; defaults to the current directory. Default: ".".-- | @param runDir Fresh directory for this invocation’s execution report and task logs; must not already exist.-- | @param executable Native CLI executable name or absolute path; defaults to this operation’s tool.-- | @param timeoutMs Maximum task duration in milliseconds; defaults to 900000. Default: 900000.-- | @param artifacts Output artifacts to collect as NAME=PATH entries; names must be unique.-- | @param browsers Browsers supplied to the playwright install_deps operation. Default: [].install_deps :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe (Array String), browsers :: Maybe (Array String) } -> Effect Contract.ExecutionResultinstall_deps args = do json <- Contract.cliInput (Contract.encodeInput args) Native.executeWithSetup Dependencies.ensureFor "playwright" "install_deps" json