philomena/docker/app/run-test

25 lines
411 B
Text
Raw Permalink Normal View History

#!/usr/bin/env sh
2020-10-26 22:01:29 +01:00
export MIX_ENV=test
# Always install mix dependencies
(cd /srv/philomena && mix deps.get)
# Sleep to allow Elasticsearch to finish initializing
# if it's not done doing whatever it does yet
echo -n "Waiting for Elasticsearch"
2024-05-24 22:36:00 +02:00
until wget -qO - opensearch:9200; do
2020-10-26 22:01:29 +01:00
echo -n "."
sleep 2
done
echo
# Create the database
mix ecto.create
mix ecto.load
# Test the application
exec mix test