zf

zenflows testing
git clone https://s.sonu.ch/~srfsh/zf.git
Log | Files | Refs | Submodules | README | LICENSE

commit 8cb9630be6f3ed39ce32fb5f3548913c140e7f00
parent a1fdd5d2abdb5144fdcd0289df4d71ddb169622a
Author: Jaromil <jaromil@dyne.org>
Date:   Fri, 27 May 2022 17:26:03 +0200

notes on running tests locally

Diffstat:
Adocs/HACKING.md | 46++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+), 0 deletions(-)

diff --git a/docs/HACKING.md b/docs/HACKING.md @@ -0,0 +1,46 @@ +# Running a local instance + +Simple instructions to run a local instance using postgres DB inside Docker and local elixir 1.12 + + +Setup the DB +``` +docker run -d -v /var/lib/postgres/data -p 5432:5432 --name db -e POSTGRES_PASSWORD=zenflows postgres:12-alpine +``` + +Install elixir +``` +apt-get install -y erlang erlang-dev erlang-os-mon erlang-parsetools erlang-tools +``` + +Build Zenflows +``` +mix deps.get +mix compile +``` + +Setup the DB for tests +``` +echo << EOF > conf/test.local.exs +import Config + +config :zenflows, Zenflows.DB.Repo, + username: "postgres", + password: "zenflows" +EOF + +./mann -t db.create +./mann -t db.migrate +``` + +Run all tests +``` +mix test +``` + +Clean the build +``` +rm -rf ./deps +rm -rf ./_build +``` +