Add make test command

master
Vincent 4 years ago
parent 040266a656
commit 43b23c46ed
  1. 7
      Makefile
  2. 18
      docker-compose.test.yml

@ -10,5 +10,12 @@ stop:
@bash docker/message.sh "stopping MobiliZon"
docker-compose down
@bash docker/message.sh "stopped"
test: stop
@bash docker/message.sh "Building front"
docker-compose -f docker-compose.yml -f docker-compose.test.yml run front yarn run build
@bash docker/message.sh "Front built"
@bash docker/message.sh "Running tests"
docker-compose -f docker-compose.yml -f docker-compose.test.yml run api mix test
@bash docker/message.sh "Tests runned"
target: init

@ -0,0 +1,18 @@
version: '3'
services:
postgres:
restart: "no"
environment:
POSTGRES_DB: mobilizon_test
front:
restart: "no"
api:
restart: "no"
environment:
MIX_ENV: "test"
MOBILIZON_DATABASE_DBNAME: mobilizon_test
command: "mix test"
volumes:
pgdata:
.:
Loading…
Cancel
Save