opencart-module/Makefile

50 lines
1.3 KiB
Makefile
Raw Permalink Normal View History

2020-12-15 13:50:54 +03:00
ROOT_DIR=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
VERSION = `cat $(ROOT_DIR)/VERSION`
2020-02-18 16:16:39 +03:00
ARCHIVE_NAME = '/tmp/retailcrm-'$(VERSION)'.ocmod.zip'
2018-06-13 17:35:29 +03:00
.PHONY: coverage
2018-06-13 17:35:29 +03:00
all: build_archive send_to_ftp delete_archive
build_archive:
zip -r $(ARCHIVE_NAME) ./src/*
send_to_ftp:
curl -T $(ARCHIVE_NAME) -u $(FTP_USER):$(FTP_PASSWORD) ftp://$(FTP_HOST)
delete_archive:
2020-02-18 10:50:40 +03:00
rm -f $(ARCHIVE_NAME)
before_script:
2020-02-18 18:22:03 +03:00
mkdir coverage
2021-09-02 11:19:20 +03:00
composer require --dev beyondit/opencart-test-suite:~$(TEST_SUITE)
composer opencart:install
2020-02-18 10:50:40 +03:00
bin/robo --load-from tests/RoboFile.php project:deploy
2020-02-20 15:26:18 +03:00
(php -S localhost:80 -t www &) 2> /dev/null > /dev/null
2020-02-18 12:53:31 +03:00
sleep 2
2020-02-19 15:17:18 +03:00
2020-02-19 17:29:21 +03:00
coverage:
2020-02-18 21:39:46 +03:00
wget https://phar.phpunit.de/phpcov-2.0.2.phar && php phpcov-2.0.2.phar merge coverage/ --clover coverage.xml
robo_deploy:
bin/robo --load-from tests/RoboFile.php project:deploy
run:
composer require --dev beyondit/opencart-test-suite ~$(TEST_SUITE)
2021-09-02 11:19:20 +03:00
composer opencart:install
bin/robo --load-from tests/RoboFile.php project:deploy
run_test: run
(php -S localhost:$(SERVER_PORT) -t www &) 2> /dev/null > /dev/null
sleep 2
composer test
test: robo_deploy
composer test
phpcs-config:
bin/phpcs --config-set installed_paths vendor/phpcompatibility/php-compatibility
phpcomp: phpcs-config
@bin/phpcs -s -p ./src --standard=PHPCompatibility --runtime-set testVersion 7.3-7.4