2018-06-13 17:35:29 +03:00
|
|
|
FILE = $(TRAVIS_BUILD_DIR)/VERSION
|
|
|
|
VERSION = `cat $(FILE)`
|
2020-02-18 16:16:39 +03:00
|
|
|
ARCHIVE_NAME = '/tmp/retailcrm-'$(VERSION)'.ocmod.zip'
|
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
|
2020-02-18 10:50:40 +03:00
|
|
|
# Change MySQL root password
|
|
|
|
echo "USE mysql;\nUPDATE user SET password=PASSWORD('root') WHERE user='root';\nFLUSH PRIVILEGES;\n" | mysql -u root
|
2020-02-19 10:50:24 +03:00
|
|
|
composer require --dev beyondit/opencart-test-suite ~$(TEST_SUITE)
|
2020-02-19 18:17:23 +03:00
|
|
|
composer require --dev opencart/opencart $(OPENCART)
|
2020-02-18 10:50:40 +03:00
|
|
|
composer setup
|
|
|
|
bin/robo --load-from tests/RoboFile.php project:deploy
|
|
|
|
(php -S localhost:8000 -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
|