1
0
Fork 0
mirror of https://codeberg.org/demostf/api.git synced 2026-06-03 09:54:17 +02:00
api/Makefile
2017-07-16 01:35:46 +02:00

22 lines
630 B
Makefile

.PHONY: docker
docker:
docker build -t demostf/api .
.PHONY: testdb
testdb:
docker run -d --name api-test -p 5433:5432 -e POSTGRES_PASSWORD=test demostf/db
node_modules: package.json
npm install
.PHONY: mocha
mocha: node_modules
DEMO_ROOT=/tmp/demos DB_PORT=5433 DB_TYPE=pgsql DB_HOST=localhost DB_USERNAME=postgres DB_USERNAME=postgres DB_PASSWORD=test DB_DATABASE=postgres\
node node_modules/.bin/mocha --recursive
.PHONY: phpunit
phpunit:
cd test; DB_PORT=5433 DB_TYPE=pgsql DB_HOST=localhost DB_USERNAME=postgres DB_USERNAME=postgres DB_PASSWORD=test DB_DATABASE=postgres phpunit
.PHONY: test
tests: phpunit mocha