Skip to content

Commit

Permalink
One way of doing all testing at once LRN-43664
Browse files Browse the repository at this point in the history
  • Loading branch information
david-scarratt-lrn committed May 9, 2024
1 parent 1cda26d commit e710897
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,14 @@ TARGETS = all build devbuild prodbuild \
ifneq (,$(DOCKER))
# Re-run the make command in a container
DKR = docker container run -t --rm \
-v $(CURDIR):/srv/sdk/php:z,delegated \
-v $(CURDIR)/v$(PHP_VERSION):/srv/sdk/php:z,delegated \
-v $(CURDIR)/.git:/srv/sdk/php/.git:z,delegated \
-v $(CURDIR)/src:/srv/sdk/php/src:z,delegated \
-v $(CURDIR)/tests:/srv/sdk/php/tests:z,delegated \
-v $(CURDIR)/composer.json:/srv/sdk/php/composer.json:delegated \
-v $(CURDIR)/Makefile:/srv/sdk/php/Makefile:delegated \
-v $(CURDIR)/phpunit.xml:/srv/sdk/php/phpunit.xml:delegated \
-v $(CURDIR)/bootstrap.php:/srv/sdk/php/bootstrap.php:delegated \
-v lrn-sdk-php_cache:/root/.composer \
-w /srv/sdk/php \
-e LRN_SDK_NO_DOCKER=1 \
Expand All @@ -49,6 +56,17 @@ docker-build:
-t $(IMAGE) .
.PHONY: docker-build lrn-test-all lrn-test-clean

# LRN targets for SDK testing

lrn-test-all: $(addprefix lrn-test-v,$(SUPPORTED_PHP_VERSIONS))

lrn-test-v%:
$(MAKE) -e PHP_VERSION=$* test

lrn-clean-all: $(addprefix lrn-clean-v,$(SUPPORTED_PHP_VERSIONS))

lrn-clean-v%:
$(MAKE) -e PHP_VERSION=$* clean

else
DIST_PREFIX = learnosity_sdk-
Expand Down

0 comments on commit e710897

Please sign in to comment.