Skip to content

ci_tools

get_ci_tool()

Return the current CI Tool based on the environment variables.

Returns:

Type Description
ProviderModule

A ProviderModule instance with methods to provide messages in

ProviderModule

a CI environment.

Source code in m/log/ci_tools/ci_tools.py
def get_ci_tool() -> ProviderModule:
    """Return the current CI Tool based on the environment variables.

    Returns:
        A `ProviderModule` instance with methods to provide messages in
        a CI environment.
    """
    env = mio.env
    if env('GITHUB_ACTIONS'):
        return gh_tool
    if env('TC') or env('TEAMCITY'):
        return tc_tool
    return local_tool