Continuous Integration

Information related to Continuous Integration.

Currently, we use two forms of continous integration: HoundCI and TravisCI. Both are primarily used as checks that are run when a pull-request is created, and have or to denote whether the checks have passed or not.

Passed CI Check, CI Error

HoundCI

HoundCI serves as a way for code to be linted when a pull request is created. HoundCI runs on the new code added, leaving comments if code does not follow the styling guidelines.

Hound Linting Error

Rules are defined in a .hound.yml file at the root of the repository, and a sample one might look like:

The above one tells HoundCI to lint using flake8 (a python linter) and points to .flake8.ini as the configuration file.

To configure HoundCI for a repository, the Backend Lead should enable it here, and once it is enabled, HoundCI will begin running checks as long as a .hound.yml file exists.

TravisCI

TravisCI is primarily used on AppDev as a way of running unit tests in a given repository. Although as developers we write unit tests, it's easy to forget to run them every single time we create a new feature.

TravisCI allows us to automate this by running tests based on a .travis.yml file at the root of the repository. A sample one for pollo-backend is below:

TravisCI can also run more complex scripts, and we also use TravisCI to push Docker images for deployment.

To configure HoundCI for a repository, the Backend Lead should enable it here, and once it is enabled, HoundCI will begin running checks as long as a .travis.yml file exists.

Last updated