-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
35 lines (25 loc) · 948 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
.PHONY: format test test-build test-clean test-unit test-integration test-bash
PHP_VERSION?=8.1
DOCKER_COMPOSE_CMD=PHP_VERSION=$(PHP_VERSION) docker compose
## ---- Testing ----------------------------------------
test-clean:
$(DOCKER_COMPOSE_CMD) down --volumes
test-build:
$(DOCKER_COMPOSE_CMD) build test
test-unit: test-build
$(DOCKER_COMPOSE_CMD) run --rm test /magento-plugin/docker/run-unit-test
test-integration: test-build
$(DOCKER_COMPOSE_CMD) run --rm test /magento-plugin/docker/run-integration-test
test: test-unit test-integration
test-bash: test-build
$(DOCKER_COMPOSE_CMD) run --rm test bash
test-install: check-magento-keys test-build
$(DOCKER_COMPOSE_CMD) run --rm test /magento-plugin/docker/install.sh
# Check Magento keys
check-magento-keys:
ifndef MAGENTO_PUBLIC
$(error MAGENTO_PUBLIC needs to set and env variable)
endif
ifndef MAGENTO_PRIVATE
$(error MAGENTO_PRIVATE needs to set and env variable)
endif