Skip to content

Commit

Permalink
.env file fallback for Travis CI
Browse files Browse the repository at this point in the history
  • Loading branch information
nahuelhds committed May 26, 2020
1 parent bbcd3c4 commit a0a8ef1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
10 changes: 5 additions & 5 deletions config-test.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
db: "${TEST_DATABASE_URL}"
db: ${TEST_DATABASE_URL}
twitter:
consumer_key: "${TEST_CONSUMER_KEY}"
consumer_secret: "${TEST_CONSUMER_SECRET}"
consumer_key: ${TEST_CONSUMER_KEY}
consumer_secret: ${TEST_CONSUMER_SECRET}
token:
access_token: "${TEST_ACCESS_TOKEN}"
access_token_secret: "${TEST_ACCESS_TOKEN_SECRET}"
access_token: ${TEST_ACCESS_TOKEN}
access_token_secret: ${TEST_ACCESS_TOKEN_SECRET}
6 changes: 5 additions & 1 deletion test_diffengine.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@
)

test_home = "test"
test_config = EnvYAML("config-test.yaml", env_file=".env")
test_env_file = ".env"
test_config = EnvYAML(
"config-test.yaml",
env_file=test_env_file if os.path.isfile(test_env_file) else None,
)

if os.path.isdir(test_home):
shutil.rmtree(test_home)
Expand Down

0 comments on commit a0a8ef1

Please sign in to comment.