diff options
| author | 2019-12-29 13:55:45 +0100 | |
|---|---|---|
| committer | 2019-12-29 13:55:45 +0100 | |
| commit | 6bc963569beb58d0799df4f747a2dcf1bcf8bf7b (patch) | |
| tree | df68b961134d8907e98a9970eee249951b156231 /Makefile | |
| parent | 518672fd279e97afeee0756ea812cd7f89c2f778 (diff) | |
tec: Add a test target to Makefile (#2725)
* tec: Add a test target to Makefile
Minor edit put php7-phar on third line
I try to keep on the third line the Alpine-specific PHP extensions (i.e.
that are not by default in Ubuntu), and in alphabetic order
Co-Authored-By: Alexandre Alapetite <alexandre@alapetite.fr>
* Allow to run make test without Docker
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -7,6 +7,18 @@ endif PORT ?= 8080 PHP := $(shell sh -c 'which php') +ifdef NO_DOCKER + PHP = php +else + PHP = docker run \ + --rm \ + --volume $(shell pwd):/var/www/FreshRSS:z \ + --env FRESHRSS_ENV=development \ + --name freshrss-php-cli \ + freshrss/freshrss:$(TAG) \ + php +endif + ifeq ($(findstring alpine,$(TAG)),alpine) DOCKERFILE=Dockerfile-Alpine else ifeq ($(findstring arm,$(TAG)),arm) @@ -39,6 +51,18 @@ start: ## Start the development environment (use Docker) stop: ## Stop FreshRSS container if any docker stop freshrss-dev +########### +## Tests ## +########### +bin/phpunit: ## Install PHPUnit for test purposes + mkdir -p bin/ + wget -O bin/phpunit https://phar.phpunit.de/phpunit-7.5.9.phar + echo '5404288061420c3921e53dd3a756bf044be546c825c5e3556dea4c51aa330f69 bin/phpunit' | sha256sum -c - || rm bin/phpunit + +.PHONY: test +test: bin/phpunit ## Run the test suite + $(PHP) ./bin/phpunit --bootstrap ./tests/bootstrap.php ./tests + ########## ## I18N ## ########## |
