forked from potsda.mn/mobilizon
Add make test command
This commit is contained in:
parent
040266a656
commit
43b23c46ed
7
Makefile
7
Makefile
|
@ -10,5 +10,12 @@ stop:
|
||||||
@bash docker/message.sh "stopping MobiliZon"
|
@bash docker/message.sh "stopping MobiliZon"
|
||||||
docker-compose down
|
docker-compose down
|
||||||
@bash docker/message.sh "stopped"
|
@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
|
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 a new issue