From 80868aab4c3644e7e5b629cbc88559f74fb01fdb Mon Sep 17 00:00:00 2001 From: Dom Tunstill Date: Wed, 27 Nov 2019 21:47:12 +0000 Subject: [PATCH] update travis .yml --- .env | 5 +++++ .gitignore | 2 +- .travis.yml | 4 ++-- src/config.py | 4 ++++ 4 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 .env diff --git a/.env b/.env new file mode 100644 index 0000000..5f45878 --- /dev/null +++ b/.env @@ -0,0 +1,5 @@ +export FLASK_ENV=development +export FLASK_ENV_TEST=test +export DATABASE_URL="postgres://localhost/sportsmatch_api_db" +export JWT_SECRET_KEY=fredperry +export TEST_DATABASE_URL="postgres://localhost/sportsmatch_api_test_db" \ No newline at end of file diff --git a/.gitignore b/.gitignore index 17a0944..e048f51 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ -.env +# .env .vscode/* .coverage diff --git a/.travis.yml b/.travis.yml index 87f9f60..2117e1e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ script: # after_success: # - coveralls -env: -- TEST_DATABASE_URL="postgres://travis@localhost:3306/sportsmatch_api_test_db" +# env: +# - TEST_DATABASE_URL="postgres://travis@localhost:3306/sportsmatch_api_test_db" # addons: # - postgresql: "9.3" diff --git a/src/config.py b/src/config.py index 7189437..32497a2 100644 --- a/src/config.py +++ b/src/config.py @@ -1,5 +1,9 @@ import os +from dotenv import load_dotenv, find_dotenv + +load_dotenv(find_dotenv()) + class Test(object): """ Test environment configuration