Add make test command
This commit is contained in:
parent
e4fb706809
commit
8171a8daf1
7
Makefile
7
Makefile
@ -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
|
||||
|
18
docker-compose.test.yml
Normal file
18
docker-compose.test.yml
Normal file
@ -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…
Reference in New Issue
Block a user