ci-diff-helper
¶
ci_diff_helper package¶
Module contents¶
Diff Helper for Continuous Integration (CI) Services.
Provides a set of utilities for dealing with Travis CI.
-
ci_diff_helper.
in_travis
()[source]¶ Detect if we are running in Travis.
See Travis env docs.
Return type: bool Returns: Flag indicating if we are running on Travis.
-
ci_diff_helper.
in_travis_pr
()[source]¶ Detect if we are running in a pull request on Travis.
See Travis env docs.
Note
This assumes we already know we are running in Travis.
Return type: bool Returns: Flag indicating if we are in a pull request on Travis.
-
ci_diff_helper.
travis_branch
()[source]¶ Get the current branch of the PR.
See Travis env docs.
Note
This assumes we already know we are running in Travis during a PR.
Return type: str Returns: The name of the branch the current pull request is changed against. Raises: OSError
if the_TRAVIS_BRANCH_ENV
environment variable isn’t set during a pull request build.
For an open source project, running unit tests, system tests, torture tests, fuzz tests, integration tests, code quality checks, etc. can quickly become a large task.
In order to limit the amount of time and resources that these jobs require, this tool provides a way to determine which files have changed and provides a Python API for these changes. In addition, this library provides the corresponding commit SHA (or other artifact) that is used as the diffbase.
The library supports (planned)