Skip to content

Commit e710897

Browse files
One way of doing all testing at once LRN-43664
1 parent 1cda26d commit e710897

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

Makefile

+19-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,14 @@ TARGETS = all build devbuild prodbuild \
2929
ifneq (,$(DOCKER))
3030
# Re-run the make command in a container
3131
DKR = docker container run -t --rm \
32-
-v $(CURDIR):/srv/sdk/php:z,delegated \
32+
-v $(CURDIR)/v$(PHP_VERSION):/srv/sdk/php:z,delegated \
33+
-v $(CURDIR)/.git:/srv/sdk/php/.git:z,delegated \
34+
-v $(CURDIR)/src:/srv/sdk/php/src:z,delegated \
35+
-v $(CURDIR)/tests:/srv/sdk/php/tests:z,delegated \
36+
-v $(CURDIR)/composer.json:/srv/sdk/php/composer.json:delegated \
37+
-v $(CURDIR)/Makefile:/srv/sdk/php/Makefile:delegated \
38+
-v $(CURDIR)/phpunit.xml:/srv/sdk/php/phpunit.xml:delegated \
39+
-v $(CURDIR)/bootstrap.php:/srv/sdk/php/bootstrap.php:delegated \
3340
-v lrn-sdk-php_cache:/root/.composer \
3441
-w /srv/sdk/php \
3542
-e LRN_SDK_NO_DOCKER=1 \
@@ -49,6 +56,17 @@ docker-build:
4956
-t $(IMAGE) .
5057
.PHONY: docker-build lrn-test-all lrn-test-clean
5158

59+
# LRN targets for SDK testing
60+
61+
lrn-test-all: $(addprefix lrn-test-v,$(SUPPORTED_PHP_VERSIONS))
62+
63+
lrn-test-v%:
64+
$(MAKE) -e PHP_VERSION=$* test
65+
66+
lrn-clean-all: $(addprefix lrn-clean-v,$(SUPPORTED_PHP_VERSIONS))
67+
68+
lrn-clean-v%:
69+
$(MAKE) -e PHP_VERSION=$* clean
5270

5371
else
5472
DIST_PREFIX = learnosity_sdk-

0 commit comments

Comments
 (0)