1
0
mirror of synced 2025-01-18 17:01:41 +03:00

Move to github actions, bump version

This commit is contained in:
opheugene 2020-12-17 13:48:10 +03:00 committed by GitHub
parent 94e175153e
commit b4af719779
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 519 additions and 291 deletions

493
.github/workflows/woo.yml vendored Normal file
View File

@ -0,0 +1,493 @@
name: woo
on:
push:
branches:
- '**'
tags-ignore:
- '*.*'
pull_request:
env:
DB_HOST: 127.0.0.1
DB_USER: root
DB_PASS: root
DB_NAME: wc_retailcrm_test
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- php-version: '5.3'
wp: '4.4'
wc: '3.0.0'
phpunit-version: 'phpunit:4.8.18'
coverage: 1
- php-version: '5.4'
wp: '4.4'
wc: '3.0.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.6'
wp: '4.4'
wc: '3.0.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.3'
wp: '4.4'
wc: '3.1.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.4'
wp: '4.4'
wc: '3.1.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.6'
wp: '4.4'
wc: '3.1.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.3'
wp: '4.4'
wc: '3.2.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.4'
wp: '4.4'
wc: '3.2.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.6'
wp: '4.4'
wc: '3.2.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.3'
wp: '4.5'
wc: '3.0.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.4'
wp: '4.5'
wc: '3.0.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.6'
wp: '4.5'
wc: '3.0.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.3'
wp: '4.5'
wc: '3.1.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.4'
wp: '4.5'
wc: '3.1.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.6'
wp: '4.5'
wc: '3.1.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.3'
wp: '4.5'
wc: '3.2.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.4'
wp: '4.5'
wc: '3.2.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.6'
wp: '4.5'
wc: '3.2.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.3'
wp: '4.6'
wc: '3.0.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.4'
wp: '4.6'
wc: '3.0.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.6'
wp: '4.6'
wc: '3.0.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.3'
wp: '4.6'
wc: '3.1.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.4'
wp: '4.6'
wc: '3.1.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.6'
wp: '4.6'
wc: '3.1.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.3'
wp: '4.6'
wc: '3.2.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.4'
wp: '4.6'
wc: '3.2.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.6'
wp: '4.6'
wc: '3.2.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.3'
wp: '4.7'
wc: '3.0.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.4'
wp: '4.7'
wc: '3.0.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.6'
wp: '4.7'
wc: '3.0.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.3'
wp: '4.7'
wc: '3.1.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.4'
wp: '4.7'
wc: '3.1.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.6'
wp: '4.7'
wc: '3.1.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.3'
wp: '4.7'
wc: '3.2.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.4'
wp: '4.7'
wc: '3.2.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.6'
wp: '4.7'
wc: '3.2.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.3'
wp: '4.8'
wc: '3.3.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.6'
wp: '4.8'
wc: '3.3.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '7.0'
wp: '4.8'
wc: '3.3.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.1'
wp: '4.8'
wc: '3.3.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.2'
wp: '4.8'
wc: '3.3.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '5.3'
wp: '4.8'
wc: '3.4.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '5.6'
wp: '4.8'
wc: '3.4.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '7.0'
wp: '4.8'
wc: '3.4.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.1'
wp: '4.8'
wc: '3.4.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.2'
wp: '4.8'
wc: '3.4.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '5.6'
wp: '4.8'
wc: '3.5.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '7.0'
wp: '4.8'
wc: '3.5.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.1'
wp: '4.8'
wc: '3.5.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.2'
wp: '4.8'
wc: '3.5.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '5.6'
wp: '4.9'
wc: '3.3.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '7.0'
wp: '4.9'
wc: '3.3.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.1'
wp: '4.9'
wc: '3.3.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.2'
wp: '4.9'
wc: '3.3.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '5.6'
wp: '4.9'
wc: '3.4.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '7.0'
wp: '4.9'
wc: '3.4.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.1'
wp: '4.9'
wc: '3.4.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.2'
wp: '4.9'
wc: '3.4.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '5.6'
wp: '4.9'
wc: '3.5.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '7.0'
wp: '4.9'
wc: '3.5.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.1'
wp: '4.9'
wc: '3.5.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.2'
wp: '4.9'
wc: '3.5.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '5.6'
wp: '5.0'
wc: '3.6.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '7.0'
wp: '5.0'
wc: '3.6.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.1'
wp: '5.0'
wc: '3.6.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.2'
wp: '5.0'
wc: '3.6.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '5.6'
wp: '5.1'
wc: '3.6.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '7.0'
wp: '5.1'
wc: '3.6.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.1'
wp: '5.1'
wc: '3.6.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.2'
wp: '5.1'
wc: '3.6.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '5.6'
wp: '5.2'
wc: '3.6.0'
phpunit-version: 'phpunit:4.8.18'
- php-version: '7.0'
wp: '5.2'
wc: '3.6.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.1'
wp: '5.2'
wc: '3.6.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.2'
wp: '5.2'
wc: '3.6.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.0'
wp: '5.1'
wc: '3.7.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.1'
wp: '5.1'
wc: '3.7.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.2'
wp: '5.1'
wc: '3.7.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.0'
wp: '5.2'
wc: '3.7.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.1'
wp: '5.2'
wc: '3.7.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.2'
wp: '5.2'
wc: '3.7.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.0'
wp: '5.3'
wc: '3.8.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.1'
wp: '5.3'
wc: '3.8.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.2'
wp: '5.3'
wc: '3.8.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.0'
wp: 'latest'
wc: '3.9.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.1'
wp: 'latest'
wc: '3.9.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.2'
wp: 'latest'
wc: '3.9.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.3'
wp: 'latest'
wc: '3.9.0'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.0'
wp: 'latest'
wc: 'latest'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.1'
wp: 'latest'
wc: 'latest'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.2'
wp: 'latest'
wc: 'latest'
phpunit-version: 'phpunit:6.4.3'
- php-version: '7.3'
wp: 'latest'
wc: 'latest'
phpunit-version: 'phpunit:6.4.3'
services:
mysql:
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: false
MYSQL_ROOT_PASSWORD: ${{ env.DB_PASS }}
MYSQL_DATABASE: ${{ env.DB_NAME }}
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5
steps:
- uses: actions/checkout@v2
- name: Setup PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: xdebug
tools: composer:v1, ${{ matrix.phpunit-version }}
extensions: gd, mbstring, mysqli, zip, mcrypt, mysql, pdo_mysql, dom
- name: Install Woocommerce
env:
WP_VERSION: ${{ matrix.wp }}
WC_VERSION: ${{ matrix.wc }}
run: make install
- name: Run tests
env:
WP_VERSION: ${{ matrix.wp }}
WC_VERSION: ${{ matrix.wc }}
run: make test
- name: Coverage
env:
COVERAGE: ${{ matrix.coverage }}
if: env.COVERAGE == 1
run: |
make coverage
bash <(curl -s https://codecov.io/bash)
deploy:
needs: ['test']
if: success() && github.event_name == 'push' && github.repository_owner == 'retailcrm' && github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup PHP 7.2
uses: shivammathur/setup-php@v2
with:
php-version: '7.2'
tools: composer:v1
- name: Build release
run: |
git fetch origin --unshallow --tags
export LAST_TAG=`git describe --abbrev=0 --tags`
export VERSION=`cat VERSION`
export ARCHIVE_NAME=retailcrm-$VERSION.ocmod.zip
export ARCHIVE_PATH="/tmp/$ARCHIVE_NAME"
export RELEASE_TAG=v$VERSION
export LAST_COMMIT=`git log --oneline --format=%B -n 1 HEAD | head -n 1`
make build_archive
- name: Create Release
id: create_release
uses: actions/create-release@v1
if: env.LAST_TAG != env.RELEASE_TAG
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
tag_name: ${{ env.RELEASE_TAG }}
release_name: ${{ env.RELEASE_TAG }}
body: ${{ env.LAST_COMMIT }}
draft: false
prerelease: false
- name: Deploy
env:
SVNREPOURL: ${{ secrets.SVNREPOURL }}
USERNAME: ${{ secrets.USERNAME }}
PASSWORD: ${{ secrets.PASSWORD }}
run: |
make svn_clone
make svn_push
- name: Cleanup
if: env.LAST_TAG != env.RELEASE_TAG
run: make remove_dir

View File

@ -1,273 +0,0 @@
os: linux
dist: trusty
language: php
if: tag IS blank
stages:
- test
- github releases
- deploy
before_install:
- export LAST_TAG=`git describe --abbrev=0 --tags`
- export CURRENT_VERSION=v`cat VERSION`
- git config --global core.autocrlf false
before_script:
- nvm install 10
- make install
env:
global:
- DB_NAME=wc_retailcrm_test
- DB_USER=root
- DB_PASS=''
- DB_HOST=localhost
script: make test
jobs:
include:
- php: 5.3
dist: precise
env: WP_VERSION=4.4 WC_VERSION=3.0.0 WP_MULTISITE=0 PHP_VERSION=5.3
- php: 5.4
env: WP_VERSION=4.4 WC_VERSION=3.0.0 WP_MULTISITE=0
- php: 5.6
env: WP_VERSION=4.4 WC_VERSION=3.0.0 WP_MULTISITE=0
- php: 5.3
dist: precise
env: WP_VERSION=4.4 WC_VERSION=3.1.0 WP_MULTISITE=0 PHP_VERSION=5.3
- php: 5.4
env: WP_VERSION=4.4 WC_VERSION=3.1.0 WP_MULTISITE=0
- php: 5.6
env: WP_VERSION=4.4 WC_VERSION=3.1.0 WP_MULTISITE=0
- php: 5.3
dist: precise
env: WP_VERSION=4.4 WC_VERSION=3.2.0 WP_MULTISITE=0 PHP_VERSION=5.3
- php: 5.4
env: WP_VERSION=4.4 WC_VERSION=3.2.0 WP_MULTISITE=0
- php: 5.6
env: WP_VERSION=4.4 WC_VERSION=3.2.0 WP_MULTISITE=0
- php: 5.3
dist: precise
env: WP_VERSION=4.5 WC_VERSION=3.0.0 WP_MULTISITE=0 PHP_VERSION=5.3
- php: 5.4
env: WP_VERSION=4.5 WC_VERSION=3.0.0 WP_MULTISITE=0
- php: 5.6
env: WP_VERSION=4.5 WC_VERSION=3.0.0 WP_MULTISITE=0
- php: 5.3
dist: precise
env: WP_VERSION=4.5 WC_VERSION=3.1.0 WP_MULTISITE=0 PHP_VERSION=5.3
- php: 5.4
env: WP_VERSION=4.5 WC_VERSION=3.1.0 WP_MULTISITE=0
- php: 5.6
env: WP_VERSION=4.5 WC_VERSION=3.1.0 WP_MULTISITE=0
- php: 5.3
dist: precise
env: WP_VERSION=4.5 WC_VERSION=3.2.0 WP_MULTISITE=0 PHP_VERSION=5.3
- php: 5.4
env: WP_VERSION=4.5 WC_VERSION=3.2.0 WP_MULTISITE=0
- php: 5.6
env: WP_VERSION=4.5 WC_VERSION=3.2.0 WP_MULTISITE=0
- php: 5.3
dist: precise
env: WP_VERSION=4.6 WC_VERSION=3.0.0 WP_MULTISITE=0 PHP_VERSION=5.3
- php: 5.4
env: WP_VERSION=4.6 WC_VERSION=3.0.0 WP_MULTISITE=0
- php: 5.6
env: WP_VERSION=4.6 WC_VERSION=3.0.0 WP_MULTISITE=0
- php: 5.3
dist: precise
env: WP_VERSION=4.6 WC_VERSION=3.1.0 WP_MULTISITE=0 PHP_VERSION=5.3
- php: 5.4
env: WP_VERSION=4.6 WC_VERSION=3.1.0 WP_MULTISITE=0
- php: 5.6
env: WP_VERSION=4.6 WC_VERSION=3.1.0 WP_MULTISITE=0
- php: 5.3
dist: precise
env: WP_VERSION=4.6 WC_VERSION=3.2.0 WP_MULTISITE=0 PHP_VERSION=5.3
- php: 5.4
env: WP_VERSION=4.6 WC_VERSION=3.2.0 WP_MULTISITE=0
- php: 5.6
env: WP_VERSION=4.6 WC_VERSION=3.2.0 WP_MULTISITE=0
- php: 5.3
dist: precise
env: WP_VERSION=4.7 WC_VERSION=3.0.0 WP_MULTISITE=0 PHP_VERSION=5.3
- php: 5.4
env: WP_VERSION=4.7 WC_VERSION=3.0.0 WP_MULTISITE=0
- php: 5.6
env: WP_VERSION=4.7 WC_VERSION=3.0.0 WP_MULTISITE=0
- php: 5.3
dist: precise
env: WP_VERSION=4.7 WC_VERSION=3.1.0 WP_MULTISITE=0 PHP_VERSION=5.3
- php: 5.4
env: WP_VERSION=4.7 WC_VERSION=3.1.0 WP_MULTISITE=0
- php: 5.6
env: WP_VERSION=4.7 WC_VERSION=3.1.0 WP_MULTISITE=0
- php: 5.3
dist: precise
env: WP_VERSION=4.7 WC_VERSION=3.2.0 WP_MULTISITE=0 PHP_VERSION=5.3
- php: 5.4
env: WP_VERSION=4.7 WC_VERSION=3.2.0 WP_MULTISITE=0
- php: 5.6
env: WP_VERSION=4.7 WC_VERSION=3.2.0 WP_MULTISITE=0
- php: 5.3
dist: precise
env: WP_VERSION=4.8 WC_VERSION=3.3.0 WP_MULTISITE=0 PHP_VERSION=5.3
- php: 5.6
env: WP_VERSION=4.8 WC_VERSION=3.3.0 WP_MULTISITE=0
- php: 7.0
env: WP_VERSION=4.8 WC_VERSION=3.3.0 WP_MULTISITE=0
- php: 7.1
env: WP_VERSION=4.8 WC_VERSION=3.3.0 WP_MULTISITE=0
- php: 7.2
env: WP_VERSION=4.8 WC_VERSION=3.3.0 WP_MULTISITE=0 USE_COMPOSER=1
- php: 5.3
dist: precise
env: WP_VERSION=4.8 WC_VERSION=3.4.0 WP_MULTISITE=0 PHP_VERSION=5.3
- php: 5.6
env: WP_VERSION=4.8 WC_VERSION=3.4.0 WP_MULTISITE=0
- php: 7.0
env: WP_VERSION=4.8 WC_VERSION=3.4.0 WP_MULTISITE=0
- php: 7.1
env: WP_VERSION=4.8 WC_VERSION=3.4.0 WP_MULTISITE=0
- php: 7.2
env: WP_VERSION=4.8 WC_VERSION=3.4.0 WP_MULTISITE=0 USE_COMPOSER=1
- php: 5.6
env: WP_VERSION=4.8 WC_VERSION=3.5.0 WP_MULTISITE=0
- php: 7.0
env: WP_VERSION=4.8 WC_VERSION=3.5.0 WP_MULTISITE=0
- php: 7.1
env: WP_VERSION=4.8 WC_VERSION=3.5.0 WP_MULTISITE=0
- php: 7.2
env: WP_VERSION=4.8 WC_VERSION=3.5.0 WP_MULTISITE=0 USE_COMPOSER=1
- php: 5.6
env: WP_VERSION=4.9 WC_VERSION=3.3.0 WP_MULTISITE=0
- php: 7.0
env: WP_VERSION=4.9 WC_VERSION=3.3.0 WP_MULTISITE=0
- php: 7.1
env: WP_VERSION=4.9 WC_VERSION=3.3.0 WP_MULTISITE=0
- php: 7.2
env: WP_VERSION=4.9 WC_VERSION=3.3.0 WP_MULTISITE=0 USE_COMPOSER=1
- php: 5.6
env: WP_VERSION=4.9 WC_VERSION=3.4.0 WP_MULTISITE=0
- php: 7.0
env: WP_VERSION=4.9 WC_VERSION=3.4.0 WP_MULTISITE=0
- php: 7.1
env: WP_VERSION=4.9 WC_VERSION=3.4.0 WP_MULTISITE=0
- php: 7.2
env: WP_VERSION=4.9 WC_VERSION=3.4.0 WP_MULTISITE=0 USE_COMPOSER=1
- php: 5.6
env: WP_VERSION=4.9 WC_VERSION=3.5.0 WP_MULTISITE=0
- php: 7.0
env: WP_VERSION=4.9 WC_VERSION=3.5.0 WP_MULTISITE=0
- php: 7.1
env: WP_VERSION=4.9 WC_VERSION=3.5.0 WP_MULTISITE=0
- php: 7.2
env: WP_VERSION=4.9 WC_VERSION=3.5.0 WP_MULTISITE=0 USE_COMPOSER=1
- php: 5.6
env: WP_VERSION=5.0 WC_VERSION=3.6.0 WP_MULTISITE=0
- php: 7.0
env: WP_VERSION=5.0 WC_VERSION=3.6.0 WP_MULTISITE=0
- php: 7.1
env: WP_VERSION=5.0 WC_VERSION=3.6.0 WP_MULTISITE=0
- php: 7.2
env: WP_VERSION=5.0 WC_VERSION=3.6.0 WP_MULTISITE=0 USE_COMPOSER=1
- php: 5.6
env: WP_VERSION=5.1 WC_VERSION=3.6.0 WP_MULTISITE=0
- php: 7.0
env: WP_VERSION=5.1 WC_VERSION=3.6.0 WP_MULTISITE=0
- php: 7.1
env: WP_VERSION=5.1 WC_VERSION=3.6.0 WP_MULTISITE=0
- php: 7.2
env: WP_VERSION=5.1 WC_VERSION=3.6.0 WP_MULTISITE=0 USE_COMPOSER=1
- php: 5.6
env: WP_VERSION=5.2 WC_VERSION=3.6.0 WP_MULTISITE=0
- php: 7.0
env: WP_VERSION=5.2 WC_VERSION=3.6.0 WP_MULTISITE=0
- php: 7.1
env: WP_VERSION=5.2 WC_VERSION=3.6.0 WP_MULTISITE=0
- php: 7.2
env: WP_VERSION=5.2 WC_VERSION=3.6.0 WP_MULTISITE=0 USE_COMPOSER=1
- php: 7.0
env: WP_VERSION=5.1 WC_VERSION=3.7.0 WP_MULTISITE=0
- php: 7.1
env: WP_VERSION=5.1 WC_VERSION=3.7.0 WP_MULTISITE=0
- php: 7.2
env: WP_VERSION=5.1 WC_VERSION=3.7.0 WP_MULTISITE=0 USE_COMPOSER=1
- php: 7.0
env: WP_VERSION=5.2 WC_VERSION=3.7.0 WP_MULTISITE=0
- php: 7.1
env: WP_VERSION=5.2 WC_VERSION=3.7.0 WP_MULTISITE=0
- php: 7.2
env: WP_VERSION=5.2 WC_VERSION=3.7.0 WP_MULTISITE=0 USE_COMPOSER=1
- php: 7.0
env: WP_VERSION=5.3 WC_VERSION=3.8.0 WP_MULTISITE=0
- php: 7.1
env: WP_VERSION=5.3 WC_VERSION=3.8.0 WP_MULTISITE=0
- php: 7.2
env: WP_VERSION=5.3 WC_VERSION=3.8.0 WP_MULTISITE=0 USE_COMPOSER=1
- php: 7.0
env: WP_VERSION=latest WC_VERSION=3.9.0 WP_MULTISITE=0
- php: 7.1
env: WP_VERSION=latest WC_VERSION=3.9.0 WP_MULTISITE=0
- php: 7.2
env: WP_VERSION=latest WC_VERSION=3.9.0 WP_MULTISITE=0 USE_COMPOSER=1
- php: 7.3.20
env: WP_VERSION=latest WC_VERSION=latest WP_MULTISITE=0 USE_COMPOSER=1
- php: 7.0
env: WP_VERSION=latest WC_VERSION=latest WP_MULTISITE=0
- php: 7.1
env: WP_VERSION=latest WC_VERSION=latest WP_MULTISITE=0
- php: 7.2
env: WP_VERSION=latest WC_VERSION=latest WP_MULTISITE=0 USE_COMPOSER=1
- php: 7.3.20
env: WP_VERSION=latest WC_VERSION=latest WP_MULTISITE=0 USE_COMPOSER=1
after_success: bash <(curl -s https://codecov.io/bash)
- stage: github releases
before_script: skip
script: skip
before_deploy:
- export VERSION=`cat VERSION`
- git config --local user.name "RetailCRM"
- git config --local user.email "support@retailcrm.ru"
- export TRAVIS_TAG=v$VERSION
- git tag $TRAVIS_TAG
deploy:
provider: releases
token: $GITHUB_OAUTH_TOKEN
cleanup: false
on:
condition: "$LAST_TAG != $CURRENT_VERSION"
if: branch = master AND type = push AND fork = false
- stage: deploy
before_install: skip
before_script: skip
script: make svn_clone
deploy:
cleanup: false
provider: script
script: make svn_push
if: branch = master AND type = push AND fork = false
after_deploy: make remove_dir

View File

@ -1,3 +1,6 @@
## 2020-12-17 4.2.2
* Редизайн RetailCRM
## 2020-12-15 4.2.1 ## 2020-12-15 4.2.1
* Редизайн RetailCRM * Редизайн RetailCRM

View File

@ -1,5 +1,6 @@
FILE = $(TRAVIS_BUILD_DIR)/VERSION ROOT_DIR=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
VERSION = `cat $(FILE)` VERSION = `cat $(ROOT_DIR)/VERSION`
ARCHIVE_NAME = '/tmp/retailcrm-'$(VERSION)'.ocmod.zip'
.PHONY: test .PHONY: test
@ -11,7 +12,7 @@ svn_push: /tmp/svn_plugin_dir
if [ ! -d "/tmp/svn_plugin_dir/tags/$(VERSION)" ]; then \ if [ ! -d "/tmp/svn_plugin_dir/tags/$(VERSION)" ]; then \
svn delete /tmp/svn_plugin_dir/trunk/*; \ svn delete /tmp/svn_plugin_dir/trunk/*; \
rm -rf /tmp/svn_plugin_dir/trunk/*; \ rm -rf /tmp/svn_plugin_dir/trunk/*; \
cp -R $(TRAVIS_BUILD_DIR)/src/* /tmp/svn_plugin_dir/trunk; \ cp -R $(ROOT_DIR)/src/* /tmp/svn_plugin_dir/trunk; \
svn copy /tmp/svn_plugin_dir/trunk /tmp/svn_plugin_dir/tags/$(VERSION) --username $(USERNAME) --password $(PASSWORD) --no-auth-cache; \ svn copy /tmp/svn_plugin_dir/trunk /tmp/svn_plugin_dir/tags/$(VERSION) --username $(USERNAME) --password $(PASSWORD) --no-auth-cache; \
svn add /tmp/svn_plugin_dir/trunk/* --force; \ svn add /tmp/svn_plugin_dir/trunk/* --force; \
svn add /tmp/svn_plugin_dir/tags/$(VERSION)/* --force; \ svn add /tmp/svn_plugin_dir/tags/$(VERSION)/* --force; \
@ -26,17 +27,11 @@ compile_pot:
msgfmt resources/pot/retailcrm-es_ES.pot -o src/languages/retailcrm-es_ES.mo msgfmt resources/pot/retailcrm-es_ES.pot -o src/languages/retailcrm-es_ES.mo
install: install:
mkdir coverage
bash tests/bin/install.sh $(DB_NAME) $(DB_USER) $(DB_HOST) $(WP_VERSION) $(WC_VERSION) $(DB_PASS) $(SKIP_DB_CREATE) bash tests/bin/install.sh $(DB_NAME) $(DB_USER) $(DB_HOST) $(WP_VERSION) $(WC_VERSION) $(DB_PASS) $(SKIP_DB_CREATE)
ifeq ($(USE_COMPOSER),1)
composer install
endif
test: test:
ifeq ($(USE_COMPOSER),1)
vendor/phpunit/phpunit/phpunit -c phpunit.xml.dist
else
phpunit -c phpunit.xml.dist phpunit -c phpunit.xml.dist
endif
local_test: install local_test: install
phpunit -c phpunit.xml.dist phpunit -c phpunit.xml.dist
@ -45,3 +40,10 @@ run_tests:
docker-compose --no-ansi up -d --build mysql docker-compose --no-ansi up -d --build mysql
docker-compose --no-ansi run --rm --no-deps app make local_test docker-compose --no-ansi run --rm --no-deps app make local_test
docker-compose stop docker-compose stop
coverage:
wget https://phar.phpunit.de/phpcov-2.0.2.phar && php phpcov-2.0.2.phar merge coverage/ --clover coverage.xml
build_archive:
zip -r $(ARCHIVE_NAME) ./src/*

View File

@ -1,7 +1,7 @@
[![Build Status](https://img.shields.io/travis/retailcrm/woocommerce-module/master.svg?style=flat-square)](https://travis-ci.org/retailcrm/woocommerce-module) [![Build Status](https://github.com/retailcrm/woocommerce-module/workflows/woo/badge.svg)](https://github.com/retailcrm/woocommerce-module/actions)
[![Coverage](https://img.shields.io/codecov/c/gh/retailcrm/woocommerce-module/master.svg?style=flat-square)](https://codecov.io/gh/retailcrm/woocommerce-module) [![Coverage](https://img.shields.io/codecov/c/gh/retailcrm/woocommerce-module/master.svg?logo=github)](https://codecov.io/gh/retailcrm/woocommerce-module)
[![WordPress plugin](https://img.shields.io/wordpress/plugin/v/woo-retailcrm.svg?style=flat-square)](https://wordpress.org/plugins/woo-retailcrm/) [![GitHub release](https://img.shields.io/github/release/retailcrm/woocommerce-module.svg?logo=codecov)](https://github.com/retailcrm/woocommerce-module/releases)
[![PHP version](https://img.shields.io/badge/PHP->=5.3-blue.svg?style=flat-square)](https://php.net/) [![PHP version](https://img.shields.io/badge/PHP->=5.4-blue.svg?logo=php)](https://php.net/)
Woocommerce-module Woocommerce-module
================== ==================

View File

@ -1 +1 @@
4.2.1 4.2.2

View File

@ -83,6 +83,9 @@ Asegúrate de tener una clave API específica para cada tienda. Las siguientes i
== Changelog == == Changelog ==
= 4.2.2=
* Переход на github actions
= 4.2.1= = 4.2.1=
* Редизайн RetailCRM * Редизайн RetailCRM

View File

@ -1,8 +1,8 @@
<?php <?php
/** /**
* Version: 4.2.1 * Version: 4.2.2
* WC requires at least: 3.0 * WC requires at least: 3.0
* WC tested up to: 3.9.3 * WC tested up to: 4.7.1
* Plugin Name: WooCommerce RetailCRM * Plugin Name: WooCommerce RetailCRM
* Plugin URI: https://wordpress.org/plugins/woo-retailcrm/ * Plugin URI: https://wordpress.org/plugins/woo-retailcrm/
* Description: Integration plugin for WooCommerce & RetailCRM * Description: Integration plugin for WooCommerce & RetailCRM

View File

@ -15,7 +15,7 @@
* *
* *
* @link https://wordpress.org/plugins/woo-retailcrm/ * @link https://wordpress.org/plugins/woo-retailcrm/
* @version 4.2.1 * @version 4.2.2
* *
* @package RetailCRM * @package RetailCRM
*/ */