Tooling and automation has been simplified dramatically with technologies like Docker and the Cloud. On top of this, continuous integration companies like Circle CI and Travis CI have added one more layer of simplicity.
- Automate all the test runs and remove the manual steps burden of the contributors
- Forbid to push code that breaks tests
- Keep the overall runs below 10min and closer to 5min (the less friction, the better)
- Keep it simple
Picking up a CI infrastructure
- Build our own in Docker images and Jenkins
- Travis CI
- Circle CI
Integrating the CI to Github
- Protect master branch
- Require Circle CI check
- Require pushed branch to be up to date with master
On the Circle side:
For historical reason, traditional
On the Hue side, here are the current checks:
Ran 641 tests in 131.800s
2289 specs, 0 failures, 10 pending specsFinished in 5.627 seconds
First the process required developers to push to a branch, then push again to the master branch. This was cumbersome as it was easy to forget to push to master, was a redundant steps and easier to get into conflicts as someone might push some other commits to master in the meantime.
Via Circle CI workflows, and only on some dedicated branches, the commits are now automatically pushed to master if the test passes. Regular test branches can still be used and we also took the opportunity to disable the duplicate re-run of the test on the master branch:
So far the time invested (~1 week) is already paid back after less than a month. Developer likes the ease of use and the lead does not need to police and revert commits breaking the master branch. Accepting external contribution has been facilitated too. Developer are even asking for integrating more checks like linting and code coverage.
As the core is now there, it is easy to iteratively add more functionalities to save even more time going forward. For example by adding steps to build Docker images, check Python 2 and 3 compatibility, add Python test coverage checks, start having integration tests or publish documentation changes automatically. Also with some more tweaks on the image we could shave off 1 or 2 minutes of run time.