Django Continuous Integration with CircleCi
18 Oct 2016Continuous Integration (CI) is a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early.
https://www.thoughtworks.com/continuous-integration
For this exercise, let’s use CircleCi. They have support for Github and Bitbucket.
- Sign up or Log in to CircleCi, you can use your Github or BitBucket credential.
- Go to Dashboard and add the project into CircleCi.
- Select your project and click build project.
- That’s it. Done.
If your django need custom tests command, you can create yaml file on your root project named circle.yml
test:
override:
- python manage.py test --settings=bookworm.settings.circleci
Here the sample project for this tutorial if you want to take a quick look.
Every time someone push their commit(s) to the repository, it will run the tests and report back to you the result.
You can also add deployment into the process, but I’ll leave that to you.