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` 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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 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 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