Skip to content

Commit 0842387

Browse files
committed
fix ci
1 parent 5852c19 commit 0842387

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

.env.test

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
AIRTABLE_API_KEY=test-key
2+
AIRTABLE_BASE_ID=appTest
3+
AIRTABLE_TABLE_NAME=tbTest

config/runtime.exs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,16 @@ if System.get_env("PHX_SERVER") do
2121
config :elixir_playground, ElixirPlaygroundWeb.Endpoint, server: true
2222
end
2323

24-
if File.exists?(".env") do
24+
env_file =
25+
case config_env() do
26+
:test -> ".env.test"
27+
_ -> ".env"
28+
end
29+
30+
if File.exists?(env_file) do
2531
IO.inspect(config_env())
26-
IO.puts("Loading environment variables from .env")
27-
source!([".env"])
32+
IO.puts("Loading environment variables from #{env_file}")
33+
source!([env_file])
2834
end
2935

3036
config :elixir_playground, :airtable,

0 commit comments

Comments
 (0)