1
0
mirror of synced 2024-11-24 14:26:08 +03:00
bitrix-module/.travis.yml

71 lines
2.0 KiB
YAML
Raw Normal View History

os: linux
dist: trusty
2019-02-28 14:47:16 +03:00
language: php
2019-07-01 14:59:29 +03:00
if: tag IS blank
2019-02-28 14:47:16 +03:00
env:
global:
- DB_BITRIX_HOST=localhost
- DB_BITRIX_LOGIN=root
- DB_BITRIX_PASS=root
- DB_BITRIX_NAME=bitrix
2019-02-28 15:57:30 +03:00
- BITRIX_PATH=$TRAVIS_BUILD_DIR/bitrix
2019-02-28 14:47:16 +03:00
stages:
- test
- deploy
install:
- echo 'short_open_tag = On' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- echo 'mbstring.func_overload = 2' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- echo 'mbstring.internal_encoding = "UTF-8"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- export LAST_TAG=`git describe --abbrev=0 --tags`
- export CURRENT_VERSION=v`php bin/bitrix-version`
2019-02-28 14:47:16 +03:00
before_script:
- make create_db
- make bitrix_install
2019-02-28 15:25:32 +03:00
script: make test
2019-02-28 14:47:16 +03:00
jobs:
include:
- php: 7.0
env: NOT_USE_VENDOR=1 BITRIX_EDITION=small_business_encode
after_success: bash <(curl -s https://codecov.io/bash)
- php: 7.1
env: BITRIX_EDITION=small_business_encode
- php: 7.2
env: BITRIX_EDITION=small_business_encode
- php: 7.3
env: BITRIX_EDITION=small_business_encode
- php: 7.0
env: NOT_USE_VENDOR=1 BITRIX_EDITION=business_encode
- php: 7.1
env: BITRIX_EDITION=business_encode
- php: 7.2
env: BITRIX_EDITION=business_encode
- php: 7.3
env: BITRIX_EDITION=business_encode
- stage: deploy
php: 7.1
before_script: export VERSION=`php bin/bitrix-version`
script: make build_release
before_deploy:
- export ARCHIVE_NAME=$TRAVIS_BUILD_DIR/release/$VERSION.tar.gz
- 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
file: $ARCHIVE_NAME
skip_cleanup: true
on:
condition: "$LAST_TAG != $CURRENT_VERSION"
if: branch = master AND type = push AND fork = false
after_deploy: make cleanup