From 3f007730cd7ba540f4566dd8cafa5815f766da2a Mon Sep 17 00:00:00 2001 From: Jalaz Kumar Date: Wed, 6 May 2020 20:06:50 +0530 Subject: [PATCH] Added more information to builder guide - Added instructions to run unit tests locally - Added instructions for integrating with Travis CI --- helper-guide.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/helper-guide.md b/helper-guide.md index ad4b11b..996cca7 100644 --- a/helper-guide.md +++ b/helper-guide.md @@ -28,7 +28,7 @@ ## Running on Production Environment + Install Heroku CLI on machine using `curl https://cli-assets.heroku.com/install-ubuntu.sh | sh` and verify using `heroku --version` -+ Confiugre Heroku deploy on local machine. ++ Configure Heroku deploy on local machine. - Login to heroku account using `heroku login` - Create heroku app using `heroku create auth-api-flask` - Set buildpack for the app using `heroku buildpacks:set heroku/python` @@ -37,7 +37,18 @@ + Login to Heroku platform and add `Heroku Postgres` as an add-on. + Modify config vars as follows: `PRODUCTION_DATABASE_URL = ` - `ENV = PRODUCTION` + `ENV = 'PRODUCTION'` `SECRET_KEY = ` + Push the project to Heroku platform using `git push heroku master` + Configure aut-deploy from GitHub hooks. + +## Running tests and Travis CI integration ++ Add the following line to the file **api.env** +`export TESTING_DATABASE_URL='sqlite:///:memory:'` ++ Run tests on dev environment using `bash run-tests.sh` ++ Signup to Travis CI using GitHub and toggle the button to ON for Auth-API from `https://travis-ci.org/github/jaykay12/Auth-API` ++ Add the following entries in `Environment Variables` of Travis CI + `ENV = 'TESTING'` + `SECRET_KEY =