Gilang Chandrasa Thoughts, stories, and ideas

Django Continuous Integration with CircleCi

Continuous 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.

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.