NoteCat/Makefile
binaryDiv 9095a604a2
All checks were successful
continuous-integration/drone/push Build is passing
add development and production targets; run phpunit in container
2020-06-28 18:07:30 +02:00

35 lines
597 B
Makefile

### Variables
DOCKER_COMPOSE_CMD := docker-compose -f docker/docker-compose.local.yml
COMPOSER := composer
PHPUNIT := vendor/bin/phpunit
.PHONY: build up down logs install test phpunit open_coverage
### Container management
build:
${DOCKER_COMPOSE_CMD} build
up:
${DOCKER_COMPOSE_CMD} up --build --detach
down:
${DOCKER_COMPOSE_CMD} down
logs:
${DOCKER_COMPOSE_CMD} logs -f || true
### Dependency management
install:
${COMPOSER} install
### Test suites
test: phpunit
phpunit:
${DOCKER_COMPOSE_CMD} run web ${PHPUNIT} -c phpunit.xml
open_coverage:
${BROWSER} coverage/index.html