Skip to content

Commit 05167b4

Browse files
DecafMangoworthant
authored andcommitted
🔧 fix: Shared in-memory URI
1 parent 76a8f86 commit 05167b4

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

.github/workflows/ci.yml

+2
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ jobs:
6060
6161
- name: Test
6262
run: |
63+
mix ecto.create
64+
mix ecto.migrate
6365
mix test --trace
6466
env:
6567
MIX_ENV: test

config/test.exs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Config
33
# Configure SQLite database for testing
44
config :backend, Backend.Repo,
55
adapter: Ecto.Adapters.SQLite3,
6-
database: ":memory:",
6+
database: "file::memory:?cache=shared",
77
pool: Ecto.Adapters.SQL.Sandbox,
88
pool_size: System.schedulers_online() * 2
99

test/test_helper.exs

+6
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
1+
Application.ensure_all_started(:ecto_sql)
2+
Application.ensure_all_started(:backend)
3+
4+
Mix.Task.run("ecto.create", ["--quiet"])
5+
Mix.Task.run("ecto.migrate", ["--quiet"])
6+
17
ExUnit.start()
28
Ecto.Adapters.SQL.Sandbox.mode(Backend.Repo, :manual)

0 commit comments

Comments
 (0)