forked from potsda.mn/mobilizon
build: only run ecto create & migrate & tz_world update on prepare_test task, not main test one
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
e051df1ab3
commit
8d11073965
1
Makefile
1
Makefile
|
@ -19,6 +19,7 @@ stop:
|
||||||
@bash docker/message.sh "Mobilizon is stopped"
|
@bash docker/message.sh "Mobilizon is stopped"
|
||||||
test: stop
|
test: stop
|
||||||
@bash docker/message.sh "Running tests"
|
@bash docker/message.sh "Running tests"
|
||||||
|
docker-compose -f docker-compose.yml -f docker-compose.test.yml run api mix prepare_test
|
||||||
docker-compose -f docker-compose.yml -f docker-compose.test.yml run api mix test $(only)
|
docker-compose -f docker-compose.yml -f docker-compose.test.yml run api mix test $(only)
|
||||||
@bash docker/message.sh "Done running tests"
|
@bash docker/message.sh "Done running tests"
|
||||||
format:
|
format:
|
||||||
|
|
|
@ -11,7 +11,7 @@ services:
|
||||||
MIX_ENV: "test"
|
MIX_ENV: "test"
|
||||||
MOBILIZON_DATABASE_DBNAME: mobilizon_test
|
MOBILIZON_DATABASE_DBNAME: mobilizon_test
|
||||||
MOBILIZON_INSTANCE_HOST: mobilizon.test
|
MOBILIZON_INSTANCE_HOST: mobilizon.test
|
||||||
command: "mix test"
|
command: "mix prepare_test && mix test"
|
||||||
volumes:
|
volumes:
|
||||||
pgdata:
|
pgdata:
|
||||||
.:
|
.:
|
||||||
|
|
6
mix.exs
6
mix.exs
|
@ -258,10 +258,12 @@ defmodule Mobilizon.Mixfile do
|
||||||
"ecto.drop",
|
"ecto.drop",
|
||||||
"ecto.setup"
|
"ecto.setup"
|
||||||
],
|
],
|
||||||
test: [
|
prepare_test: [
|
||||||
"ecto.create",
|
"ecto.create",
|
||||||
"ecto.migrate",
|
"ecto.migrate",
|
||||||
"tz_world.update",
|
"tz_world.update"
|
||||||
|
],
|
||||||
|
test: [
|
||||||
&run_test/1
|
&run_test/1
|
||||||
],
|
],
|
||||||
"phx.deps_migrate_serve": [
|
"phx.deps_migrate_serve": [
|
||||||
|
|
Loading…
Reference in a new issue