From 18983f03b84d4d4a4ebbe62a7cf7f22e22807b61 Mon Sep 17 00:00:00 2001 From: Sean Molenaar Date: Mon, 31 Aug 2020 22:19:35 +0200 Subject: Test GH actions flow Signed-off-by: Sean Molenaar --- Makefile | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6a82237c3..c6194206e 100644 --- a/Makefile +++ b/Makefile @@ -186,16 +186,31 @@ endif tar -czf $(appstore_package_name).tar.gz -C $(appstore_build_directory)/../ $(app_name) +.PHONY: js-test +js-test: + cd js && $(npm) run test + +.PHONY: php-test-dependencies +php-test-dependencies: + $(composer) update --prefer-dist + +.PHONY: unit-test +unit-test: + ./vendor/phpunit/phpunit/phpunit -c phpunit.xml --coverage-clover build/php-unit.clover + +# \Test\TestCase is only allowed to access the db if TRAVIS environment variable is set +.PHONY: integration-test +integration-test: + env TRAVIS=1 ./vendor/phpunit/phpunit/phpunit -c phpunit.integration.xml + # Command for running JS and PHP tests. Works for package.json files in the js/ # and root directory. If phpunit is not installed systemwide, a copy is fetched # from the internet .PHONY: test -test: - $(composer) update --prefer-dist - cd js && $(npm) run test - ./vendor/phpunit/phpunit/phpunit -c phpunit.xml --coverage-clover build/php-unit.clover - # \Test\TestCase is only allowed to access the db if TRAVIS environment variable is set - env TRAVIS=1 ./vendor/phpunit/phpunit/phpunit -c phpunit.integration.xml +test: php-test-dependencies + $(MAKE) unit-test + $(MAKE) integration-test $(MAKE) phpcs $(MAKE) phpstan + $(MAKE) js-test ./bin/tools/generate_authors.php -- cgit v1.2.3