DoDo is a web-based todo application built using Django and Django REST Framework (DRF). Originally developed as an assignment for Continious Integration.
Develop a CI pipeline for this app which includes the following features
- Run when a PR is created with
develop
as base branch. - Run when a Push event happens in
develop
branch. - Run migrations in pipeline.
- Run unit tests.
- If a test fails, send a failure message in slack and terminate the pipeline.
- If and only if all test cases pass, push the docker image to dockerhub.
- Send a slack message in channel after the successful completion of pipeline.
- Python 3.x
- PostgreSQL
As a best practice, it is advised to create a virtual environment to store this project's dependencies separately. You can install virtualenv with
- Install virtualenv (optional)
pip install virtualenv
- Clone the repository.
git clone https://github.com/abdullahxz/DoDo.git
- cd into repo directory.
cd DoDo
- Create env (optional)
python -m venv env
- Activate virtualenv (optional)
source env/bin/activate
- Install depndencies
pip install -r requirements.txt
- Make sure you have a
.env
file with following variables.DB_NAME = xxx DB_USER = xxx DB_PASSWORD = xxx DB_HOST = xxx DB_PORT = xxx
- Apply migrations
python manage.py migrate
- Seed data into database for development environment
python manage.py seed_data
- Run unit tests
python manage.py test
- Run dev server
python manage.py runserver