1
0
mirror of synced 2025-02-20 17:03:13 +03:00

update build

This commit is contained in:
Akolzin Dmitry 2020-02-25 13:45:17 +03:00
parent 6fa5e3d511
commit cc4e8c9c5b
18 changed files with 33 additions and 39 deletions

View File

@ -1,34 +1,26 @@
language: php
os: linux
dist: trusty
sudo: false
language: php
php:
- 5.6
- 7.0
- 7.1
if: tag IS blank
env:
- WP_VERSION=latest WP_MULTISITE=0
matrix:
fast_finish: true
include:
- php: 7.2
env: WP_VERSION=latest WP_MULTISITE=0 RUN_PHPCS=1
stages:
- test
- deploy
before_script:
- bash tests/bin/install.sh wc_retailcrm_test root '' localhost $WP_VERSION
script:
- bash tests/bin/script.sh
script: make tests
deploy:
skip_cleanup: true
provider: script
script: make
on:
php: 7.2
branch: master
condition: "$DEPLOY = true"
jobs:
include:
- php: 5.6
env: WP_VERSION=latest WP_MULTISITE=0
- stage: deploy
deploy:
cleanup: false
provider: script
script: make
if: branch = master AND type = push AND fork = false

View File

@ -20,3 +20,18 @@ svn_push: /tmp/svn_plugin_dir
remove_dir:
rm -rf /tmp/svn_plugin_dir
compile_pot:
msgfmt resources/pot/retailcrm-ru_RU.pot -o src/languages/retailcrm-ru_RU.mo
msgfmt resources/pot/retailcrm-es_ES.pot -o src/languages/retailcrm-es_ES.mo
install:
bash tests/bin/install.sh
composer install
tests: install
ifeq ($(USE_COMPOSER),1)
vendor/phpunit/phpunit/phpunit -c phpunit.xml.dist
else
phpunit -c phpunit.xml.dist
endif

View File

@ -13,7 +13,7 @@
>
<testsuites>
<testsuite name="Retailcrm WooCommerce Test Suite">
<directory suffix=".php">tests/phpunit</directory>
<directory suffix=".php">tests</directory>
</testsuite>
</testsuites>
<filter>

View File

@ -1,5 +0,0 @@
#!/usr/bin/env bash
DIRECTORY=$(cd `dirname $0` && pwd)
msgfmt $DIRECTORY/../pot/retailcrm-ru_RU.pot -o $DIRECTORY/../../src/languages/retailcrm-ru_RU.mo
msgfmt $DIRECTORY/../pot/retailcrm-es_ES.pot -o $DIRECTORY/../../src/languages/retailcrm-es_ES.mo

View File

@ -1,8 +0,0 @@
#!/usr/bin/env bash
if [[ ${RUN_PHPCS} == 1 ]]; then
composer install
vendor/phpunit/phpunit/phpunit -c phpunit.xml.dist
else
phpunit -c phpunit.xml.dist
fi