()
Returns used CI provider based on environment.
Returns used CI provider based on environment.
Returns used CI provider based on environment .
def _infer_ci_provider() -> str:
    """Returns used CI provider based on environment."""
    if os.getenv("BENTO_ACTION") == "true":
        return "github-actions/bento-action"

    # https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables
    elif os.getenv("GITHUB_ACTIONS") == "true":
        return "github-actions"

    # https://circleci.com/docs/2.0/env-vars/#built-in-environment-variables
    elif os.getenv("CIRCLECI") == "true":
        return "circleci"

    # https://docs.travis-ci.com/user/environment-variables/#default-environment-variables
    elif os.getenv("TRAVIS") == "true":
        return "travis"

    # https://docs.gitlab.com/ee/ci/variables/predefined_variables.html
    elif os.getenv("GITLAB_CI") == "true":
        return "gitlab-ci"

    elif os.getenv("CI"):
        return "unknown"

    else:
        return "none"
def _infer_ci_provider ( ) -> str : if os . getenv ( "BENTO_ACTION" ) == "true" : return "github-actions/bento-action" # https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables elif os . getenv ( "GITHUB_ACTIONS" ) == "true" : return "github-actions" # https://circleci.com/docs/2.0/env-vars/#built-in-environment-variables elif os . getenv ( "CIRCLECI" ) == "true" : return "circleci" # https://docs.travis-ci.com/user/environment-variables/#default-environment-variables elif os . getenv ( "TRAVIS" ) == "true" : return "travis" # https://docs.gitlab.com/ee/ci/variables/predefined_variables.html elif os . getenv ( "GITLAB_CI" ) == "true" : return "gitlab-ci" elif os . getenv ( "CI" ) : return "unknown" else : return "none"