mirror of
https://github.com/retailcrm/prestashop-module.git
synced 2025-03-01 19:03:14 +03:00
Fixed testing
This commit is contained in:
parent
ad5779c41b
commit
f4984faa43
7
.github/workflows/presta.yml
vendored
7
.github/workflows/presta.yml
vendored
@ -98,7 +98,7 @@ jobs:
|
||||
mysql:
|
||||
image: mysql:5.7
|
||||
env:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_ALLOW_EMPTY_PASSWORD: yes
|
||||
ports:
|
||||
- 3306/tcp
|
||||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5
|
||||
@ -115,10 +115,13 @@ jobs:
|
||||
run: sudo /etc/init.d/mysql start
|
||||
- name: Status mysql service
|
||||
run: sudo systemctl status mysql
|
||||
- name: Test MySQL Connection
|
||||
run: mysql -u root -h '127.0.0.1' --port ${{ job.services.mysql.ports['3306'] }} -e "show databases"
|
||||
- name: Install PrestaShop
|
||||
env:
|
||||
BRANCH: ${{ matrix.branch }}
|
||||
COMPOSERV1: ${{ matrix.composerv1 }}
|
||||
MYSQL_PORT: ${{ job.services.mysql.ports['3306'] }}
|
||||
run: make before_script
|
||||
- name: Run tests
|
||||
env:
|
||||
@ -177,7 +180,7 @@ jobs:
|
||||
if: env.LAST_TAG != env.RELEASE_TAG
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ${{ env.ARCHIVE_PATH }}
|
||||
|
18
Makefile
18
Makefile
@ -17,7 +17,9 @@ delete_archive:
|
||||
composer: clone_prestashop
|
||||
cd $(PRESTASHOP_DIR) && git checkout $(BRANCH)
|
||||
ifeq ($(COMPOSERV1),1)
|
||||
cd $(PRESTASHOP_DIR) && php -r "copy('https://getcomposer.org/download/1.10.17/composer.phar', 'composer.phar');" && php composer.phar install --prefer-dist --no-interaction --no-progress
|
||||
cd $(PRESTASHOP_DIR) \
|
||||
&& php -r "copy('https://getcomposer.org/download/1.10.17/composer.phar', 'composer.phar');" \
|
||||
&& php composer.phar install --prefer-dist --no-interaction --no-progress
|
||||
else
|
||||
cd $(PRESTASHOP_DIR)/tests && composer install
|
||||
endif
|
||||
@ -39,14 +41,22 @@ setup_apache:
|
||||
before_script: composer
|
||||
mkdir coverage
|
||||
ifeq ($(COMPOSERV1),1)
|
||||
cd $(PRESTASHOP_DIR) && sed -i 's/--db_name=prestashop/--db_name=prestashop --db_user=root --db_password=root/g' travis-scripts/install-prestashop && bash travis-scripts/install-prestashop
|
||||
cd $(PRESTASHOP_DIR) \
|
||||
&& sed -i 's/mysql -u root/mysql -u root --port $(MYSQL_PORT)/g' travis-scripts/install-prestashop \
|
||||
&& sed -i 's/--db_server=127.0.0.1 --db_name=prestashop/--db_server=127.0.0.1:$(MYSQL_PORT) --db_name=prestashop --db_user=root/g' travis-scripts/install-prestashop \
|
||||
&& bash travis-scripts/install-prestashop
|
||||
else
|
||||
cd $(PRESTASHOP_DIR) && sed -i 's/--db_name=prestashop/--db_name=prestashop --db_user=root --db_password=root/g' travis-scripts/install-prestashop.sh && bash travis-scripts/install-prestashop.sh
|
||||
cd $(PRESTASHOP_DIR) \
|
||||
&& sed -i 's/mysql -u root/mysql -u root -proot --port $(MYSQL_PORT)/g' travis-scripts/install-prestashop.sh \
|
||||
&& sed -i 's/--db_server=127.0.0.1 --db_name=prestashop/--db_server=127.0.0.1:$(MYSQL_PORT) --db_name=prestashop --db_user=root/g' travis-scripts/install-prestashop.sh \
|
||||
&& bash travis-scripts/install-prestashop.sh
|
||||
endif
|
||||
|
||||
test:
|
||||
ifeq ($(COMPOSERV1),1)
|
||||
cd $(PRESTASHOP_DIR) && php composer.phar run-script create-test-db --timeout=0
|
||||
cd $(PRESTASHOP_DIR) \
|
||||
&& sed -i 's/throw new Exception/#throw new Exception/g' src/PrestaShopBundle/Install/DatabaseDump.php \
|
||||
&& php composer.phar run-script create-test-db --timeout=0
|
||||
cd $(PRESTASHOP_DIR) && php vendor/bin/phpunit -c $(ROOT_DIR)/phpunit.xml.dist
|
||||
else
|
||||
phpunit -c phpunit.xml.dist
|
||||
|
@ -3,7 +3,7 @@
|
||||
[](https://github.com/retailcrm/prestashop-module/releases)
|
||||
[](https://php.net/)
|
||||
|
||||
Prestashop module
|
||||
Prestashop module.
|
||||
=================
|
||||
|
||||
Module allows integrate CMS Prestashop with [RetailCRM](https://www.retailcrm.pro) ([Documentation](https://docs.retailcrm.ru/Users/Integration/SiteModules/PrestaShop) page)
|
||||
|
Loading…
x
Reference in New Issue
Block a user