mirror of
https://github.com/retailcrm/prestashop-module.git
synced 2025-03-02 19:33:14 +03:00
update Makefile
This commit is contained in:
parent
d58e11119f
commit
24ea74e21c
@ -22,13 +22,9 @@ matrix:
|
|||||||
- php: 7.1
|
- php: 7.1
|
||||||
env: BRANCH=1.6.1.x
|
env: BRANCH=1.6.1.x
|
||||||
|
|
||||||
before_script:
|
before_script: make before_script
|
||||||
- bash tests/bin/clone_prestashop.sh
|
|
||||||
- bash tests/bin/setup-apache.sh
|
|
||||||
- bash tests/bin/before_script.sh
|
|
||||||
|
|
||||||
script:
|
script: make test
|
||||||
- bash tests/bin/script.sh
|
|
||||||
|
|
||||||
#deploy:
|
#deploy:
|
||||||
# skip_cleanup: true
|
# skip_cleanup: true
|
||||||
|
43
Makefile
43
Makefile
@ -1,3 +1,5 @@
|
|||||||
|
ROOT_DIR=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
||||||
|
PRESTASHOP_DIR=$(ROOT_DIR)/../PrestaShop
|
||||||
FILE = $(TRAVIS_BUILD_DIR)/VERSION
|
FILE = $(TRAVIS_BUILD_DIR)/VERSION
|
||||||
VERSION = `cat $(FILE)`
|
VERSION = `cat $(FILE)`
|
||||||
ARCHIVE_NAME = '/tmp/retailcrm-'$(VERSION)'.zip'
|
ARCHIVE_NAME = '/tmp/retailcrm-'$(VERSION)'.zip'
|
||||||
@ -15,3 +17,44 @@ send_to_ftp:
|
|||||||
delete_archive:
|
delete_archive:
|
||||||
rm -f $(ARCHIVE_NAME)
|
rm -f $(ARCHIVE_NAME)
|
||||||
rm -f /tmp/retailcrm.zip
|
rm -f /tmp/retailcrm.zip
|
||||||
|
|
||||||
|
composer: clone_prestashop
|
||||||
|
ifeq ($(COMPOSER_IN_TESTS),1)
|
||||||
|
@cd $(ROOT_DIR)/../PrestaShop/tests && composer install
|
||||||
|
else
|
||||||
|
@cd $(ROOT_DIR)/../PrestaShop && composer install --prefer-dist --no-interaction --no-progress
|
||||||
|
endif
|
||||||
|
|
||||||
|
clone_prestashop:
|
||||||
|
@cd $(ROOT_DIR)/.. && git clone https://github.com/PrestaShop/PrestaShop
|
||||||
|
|
||||||
|
setup_apache: composer
|
||||||
|
@bash $(PRESTASHOP_DIR)/travis-scripts/setup-php-fpm.sh
|
||||||
|
@echo "* Preparing Apache ..."
|
||||||
|
@sudo a2enmod rewrite actions fastcgi alias
|
||||||
|
# Use default config
|
||||||
|
@sudo cp -f $(PRESTASHOP_DIR)/tests/travis-ci-apache-vhost /etc/apache2/sites-available/000-default.conf
|
||||||
|
@sudo sed -e "s?%PRESTASHOP_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf
|
||||||
|
@sudo chmod 777 -R $HOME
|
||||||
|
# Starting Apache
|
||||||
|
@sudo service apache2 restart
|
||||||
|
|
||||||
|
before_script: setup_apache
|
||||||
|
ifeq ($(COMPOSER_IN_TESTS),1)
|
||||||
|
ifneq ("$(wildcard $(PRESTASHOP_DIR)/tests/parameters.yml.travis)","")
|
||||||
|
@cd $(PRESTASHOP_DIR) && cp tests/parameters.yml.travis app/config/parameters.yml
|
||||||
|
else
|
||||||
|
@cd $(PRESTASHOP_DIR) && cp tests-legacy/parameters.yml.travis app/config/parameters.yml
|
||||||
|
endif
|
||||||
|
@bash $(PRESTASHOP_DIR)/travis-scripts/install-prestashop
|
||||||
|
else
|
||||||
|
@bash $(PRESTASHOP_DIR)/travis-scripts/install-prestashop.sh
|
||||||
|
endif
|
||||||
|
|
||||||
|
test:
|
||||||
|
ifeq ($(COMPOSER_IN_TESTS),1)
|
||||||
|
@phpunit
|
||||||
|
else
|
||||||
|
@cd $(PRESTASHOP_DIR) && composer run-script create-test-db --timeout=0
|
||||||
|
@php $(PRESTASHOP_DIR)/vendor/bin/phpunit -c $(ROOT_DIR)/phpunit.xml.dist
|
||||||
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user