Skip to content

Commit 25175db

Browse files
committed
Try specifying DB creds
1 parent e6636c1 commit 25175db

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

.github/workflows/build.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@ jobs:
2828

2929
postgres:
3030
image: postgres:16
31-
ports: ["5432:5432"]
31+
ports:
32+
- 5432:5432
3233
env:
3334
POSTGRES_USER: postgres
3435
POSTGRES_PASSWORD: postgres
36+
POSTGRES_DB: upload_test
3537
options: >-
3638
--health-cmd pg_isready
3739
--health-interval 10s

config/test.exs

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ config :upload, Upload.Test.Repo,
77
adapter: Ecto.Adapters.Postgres,
88
database: "upload_test",
99
pool: Ecto.Adapters.SQL.Sandbox,
10-
priv: "test/support/"
10+
priv: "test/support/",
11+
username: "postgres",
12+
password: "postgres",
13+
hostname: "localhost"
1114

1215
config :upload, Upload.Test.Vault,
1316
ciphers: [

test/test_helper.exs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
Mix.Task.run("ecto.drop", ["-r", "Upload.Test.Repo"])
2-
Mix.Task.run("ecto.create", ["-r", "Upload.Test.Repo"])
3-
Mix.Task.run("ecto.migrate", ["-r", "Upload.Test.Repo"])
1+
Mix.Task.run("ecto.drop", ["--quiet", "-r", "Upload.Test.Repo"])
2+
Mix.Task.run("ecto.create", ["--quiet", "-r", "Upload.Test.Repo"])
3+
Mix.Task.run("ecto.migrate", ["--quiet", "-r", "Upload.Test.Repo"])
44

55
{:ok, _} = Upload.Test.Vault.start_link()
66

0 commit comments

Comments
 (0)