os: linux language: php dist: trusty if: tag IS blank env: global: - OC_DB_HOSTNAME=localhost - OC_DB_USERNAME=root - OC_DB_PASSWORD=root - OC_DB_DATABASE=tests_opencart - OC_DB_DRIVER=mysqli - OC_USERNAME=admin - OC_PASSWORD=admin - OC_EMAIL=test@test.com - SERVER_PORT=80 - SERVER_URL=http://localhost stages: - test - phpcs - deploy before_install: - export LAST_TAG=`git describe --abbrev=0 --tags` - export CURRENT_VERSION=v`cat VERSION` before_script: make before_script script: composer test after_success: - make coverage - bash <(curl -s https://codecov.io/bash) jobs: include: - php: 7.0 env: TEST_SUITE=2.3 OPENCART=2.3.0.0 - php: 7.0 env: TEST_SUITE=2.3 OPENCART=2.3.0.1 - php: 7.0 env: TEST_SUITE=2.3 OPENCART=2.3.0.2 - php: 7.1 env: TEST_SUITE=2.3 OPENCART=2.3.0.0 - php: 7.1 env: TEST_SUITE=2.3 OPENCART=2.3.0.1 - php: 7.1 env: TEST_SUITE=2.3 OPENCART=2.3.0.2 - php: 7.0 env: TEST_SUITE=3.0 OPENCART=3.0.0.0 - php: 7.0 env: TEST_SUITE=3.0 OPENCART=3.0.0.2 - php: 7.0 env: TEST_SUITE=3.0 OPENCART=3.0.1.0 - php: 7.0 env: TEST_SUITE=3.0 OPENCART=3.0.1.1 - php: 7.0 env: TEST_SUITE=3.0 OPENCART=3.0.1.2 - php: 7.0 env: TEST_SUITE=3.0 OPENCART=3.0.2.0 - php: 7.0 env: TEST_SUITE=3.0 OPENCART=3.0.3.0 - php: 7.0 env: TEST_SUITE=3.0 OPENCART=3.0.3.1 - php: 7.0 env: TEST_SUITE=3.0 OPENCART=3.0.3.2 - php: 7.1 env: TEST_SUITE=3.0 OPENCART=3.0.0.0 - php: 7.1 env: TEST_SUITE=3.0 OPENCART=3.0.0.2 - php: 7.1 env: TEST_SUITE=3.0 OPENCART=3.0.1.0 - php: 7.1 env: TEST_SUITE=3.0 OPENCART=3.0.1.1 - php: 7.1 env: TEST_SUITE=3.0 OPENCART=3.0.1.2 - php: 7.1 env: TEST_SUITE=3.0 OPENCART=3.0.2.0 - php: 7.1 env: TEST_SUITE=3.0 OPENCART=3.0.3.0 - php: 7.1 env: TEST_SUITE=3.0 OPENCART=3.0.3.1 - php: 7.1 env: TEST_SUITE=3.0 OPENCART=3.0.3.2 - php: 7.2 env: TEST_SUITE=3.0 OPENCART=3.0.0.0 - php: 7.2 env: TEST_SUITE=3.0 OPENCART=3.0.0.2 - php: 7.2 env: TEST_SUITE=3.0 OPENCART=3.0.1.0 - php: 7.2 env: TEST_SUITE=3.0 OPENCART=3.0.1.1 - php: 7.2 env: TEST_SUITE=3.0 OPENCART=3.0.1.2 - php: 7.2 env: TEST_SUITE=3.0 OPENCART=3.0.2.0 - php: 7.2 env: TEST_SUITE=3.0 OPENCART=3.0.3.0 - php: 7.2 env: TEST_SUITE=3.0 OPENCART=3.0.3.1 - php: 7.2 env: TEST_SUITE=3.0 OPENCART=3.0.3.2 - php: 7.3 env: TEST_SUITE=3.0 OPENCART=3.0.0.0 - php: 7.3 env: TEST_SUITE=3.0 OPENCART=3.0.0.2 - php: 7.3 env: TEST_SUITE=3.0 OPENCART=3.0.1.0 - php: 7.3 env: TEST_SUITE=3.0 OPENCART=3.0.1.1 - php: 7.3 env: TEST_SUITE=3.0 OPENCART=3.0.1.2 - php: 7.3 env: TEST_SUITE=3.0 OPENCART=3.0.2.0 - php: 7.3 env: TEST_SUITE=3.0 OPENCART=3.0.3.0 - php: 7.3 env: TEST_SUITE=3.0 OPENCART=3.0.3.1 - php: 7.3 env: TEST_SUITE=3.0 OPENCART=3.0.3.2 - stage: phpcs before_script: composer install script: make phpcomp after_success: skip - stage: deploy before_script: skip script: make build_archive before_deploy: - export VERSION=`cat VERSION` - export ARCHIVE_NAME=/tmp/retailcrm-$VERSION.ocmod.zip - 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 file: $ARCHIVE_NAME on: condition: "$LAST_TAG != $CURRENT_VERSION" if: branch = master AND type = push AND fork = false after_deploy: make delete_archive