This is the basic namespace to use in unit tests. It provides various functions that can be used to simulate a MonkeyCI build environment.
This is the basic namespace to use in unit tests. It provides various functions that can be used to simulate a MonkeyCI build environment.
Checks if the argument is an action job
Checks if the argument is an action job
(added files)Defines a set of added (i.e. new) files. To be used with the xxx-changes functions.
Defines a set of added (i.e. new) files. To be used with the `xxx-changes` functions.
Retrieves configured checkout dir in the context
Retrieves configured checkout dir in the context
Checks if the argument is a container job
Checks if the argument is a container job
(execute-job job ctx)For an action job, executes given job with specified context. Look out for side effects! For container jobs, simulates the execution and returns a structure similar to the real thing.
For an action job, executes given job with specified context. Look out for side effects! For container jobs, simulates the execution and returns a structure similar to the real thing.
Checks if the job return value is a failure
Checks if the job return value is a failure
(modified files)Defines a set of modified files.
Defines a set of modified files.
(removed files)Defines a set of removed files.
Defines a set of removed files.
(resolve-jobs jobs ctx)Given one or more unresolved jobs, resolves them using the given context. This is useful if you want to get a full list of the actual jobs that MonkeyCI will run given a specific context.
Given one or more unresolved jobs, resolves them using the given context. This is useful if you want to get a full list of the actual jobs that MonkeyCI will run given a specific context.
(set-changes ctx changes)Overwrites context file changes
Overwrites context file changes
(set-main-branch ctx b)Sets the configured main branch for the repo in the context. See also
monkey.ci.api/main-branch.
Sets the configured main branch for the repo in the context. See also `monkey.ci.api/main-branch`.
(set-trigger-source ctx src)Sets build trigger source (e.g. :api, :github-webhook)
Sets build trigger source (e.g. `:api`, `:github-webhook`)
Checks if the job return value is successful
Checks if the job return value is successful
Basic test context, to use in test jobs
Basic test context, to use in test jobs
(update-changes ctx f & args)Updates context file changes
Updates context file changes
(with-archs ctx archs)Configures context to provide specified architectures.
Configures context to provide specified architectures.
(with-build-id ctx id)Sets build id in the context
Sets build id in the context
(with-build-params params & body)Simulates given build parameters for the body to execute
Simulates given build parameters for the body to execute
(with-changes ctx changes)Adds given file set to the context file changes
Adds given file set to the context file changes
(with-checkout-dir ctx dir)Sets the given directory as the build checkout dir in the context
Sets the given directory as the build checkout dir in the context
(with-git-ref ctx ref)Sets given ref in the context git configuration
Sets given ref in the context git configuration
(with-job-dir ctx dir)Sets the given directory as the job work dir in the context
Sets the given directory as the job work dir in the context
(with-tmp-checkout-dir ctx)Configures a temporary checkout directory in the context
Configures a temporary checkout directory in the context
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |