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.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102-- Generated by Gleam CI helpers.module CI.Component (run, version, setup, test, install, verify, cache_list) 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 "cypress" "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 "cypress" "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 "cypress" "setup" json
-- | Run Cypress specs headlessly, returning a failure if any tests fail.-- | @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 browser Browser supplied to the cypress test operation.-- | @param configFile Config File supplied to the cypress test operation.-- | @param config Named configuration selected by the native tool.-- | @param spec RPM spec file inside the package tree.-- | @param reporter Reporter supplied to the cypress test operation.-- | @param reporterOptions Reporter Options supplied to the cypress test operation.-- | @param component Component supplied to the cypress test operation.-- | @param record Record supplied to the cypress test operation.-- | @param parallel Maximum number of concurrent build or test jobs.-- | @param group Group supplied to the cypress test operation.-- | @param ciBuildId Ci Build Id supplied to the cypress test operation.-- | @param tag Tag supplied to the cypress test operation.test :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe (Array String), browser :: Maybe String, configFile :: Maybe String, config :: Maybe String, spec :: Maybe String, reporter :: Maybe String, reporterOptions :: Maybe String, component :: Maybe Boolean, record :: Maybe Boolean, parallel :: Maybe Boolean, group :: Maybe String, ciBuildId :: Maybe String, tag :: Maybe String } -> Effect Contract.ExecutionResulttest args = do json <- Contract.cliInput (Contract.encodeInput args) Native.executeWithSetup Dependencies.ensureFor "cypress" "test" json
-- | Download the Cypress binary matching the installed npm 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 force Force supplied to the cypress install operation.install :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe (Array String), force :: Maybe Boolean } -> Effect Contract.ExecutionResultinstall args = do json <- Contract.cliInput (Contract.encodeInput args) Native.executeWithSetup Dependencies.ensureFor "cypress" "install" json
-- | Verify that the installed Cypress binary can start.-- | @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.verify :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe (Array String) } -> Effect Contract.ExecutionResultverify args = do json <- Contract.cliInput (Contract.encodeInput args) Native.executeWithSetup Dependencies.ensureFor "cypress" "verify" json
-- | List installed Cypress binaries.-- | @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.cache_list :: { project :: Maybe String, runDir :: String, executable :: Maybe String, timeoutMs :: Maybe Int, artifacts :: Maybe (Array String) } -> Effect Contract.ExecutionResultcache_list args = do json <- Contract.cliInput (Contract.encodeInput args) Native.executeWithSetup Dependencies.ensureFor "cypress" "cache_list" json