An open API service indexing awesome lists of open source software.

https://github.com/ilhan-mstf/tdd-sample-app

A sample app that implements Continous Integration and Continous Deployment flow.
https://github.com/ilhan-mstf/tdd-sample-app

aws-lambda codecov continuous-deployment continuous-integration devops python serverless tdd-sample travis-ci

Last synced: about 1 month ago
JSON representation

A sample app that implements Continous Integration and Continous Deployment flow.

Awesome Lists containing this project

README

          

# tdd-sample-app
[![Build Status](https://travis-ci.com/ilhan-mstf/tdd-sample-app.svg?branch=master)](https://travis-ci.com/ilhan-mstf/tdd-sample-app) [![codecov](https://codecov.io/gh/ilhan-mstf/tdd-sample-app/branch/master/graph/badge.svg)](https://codecov.io/gh/ilhan-mstf/tdd-sample-app)

> A sample app that implements Continous Integration and Continous Deployment flow.

This repo provides a sample flow for integration test and automatic deployment of a project. The functionality of the project is to sum given numbers. It is deployed to the AWS Lamda. Lambda function is invoked by a HTTP call. There is two different HTTP call; first one is a `GET` request and just returns 'Hello World' json response and the other one is a `POST` request gets numbers from request body, validates numbers and returns summation of them as a json.

In this project, GitFlow branching model is followed and automatic tests and deployment operations are run when there is a new commit to branches: dev, release/\*, and master. Each branch has a different deployment stage. For example, master branch is deployed to production, on the other hand, release/\* branch is deployed to beta, and lastly dev is deployed to dev.

Project is coded in Python and for unit tests PyTest is used. To deploy AWS Lamba, Serverless Framework is used. For continuos integration and deployment Travis CI is used. Furthermore, Codecov is used to measure code covarage by unit tests.

When a commit is pushed to one of the branches among master, dev, and release/\* a TravisCI job is triggered. First, it prepares the environment and then run tests. If the code passes tests, code covarage report is generated and deployed to the related staging environment. If it fails, you'll get a notification about failure, and also you can track the status from TravisCI dashboard. Furthermore, badges provides a shortcut to view the status of branch and they are generated by TravisCI and CodeCov.