opencart-module/.travis.yml
Akolzin Dmitry 1317770335 codecov
2020-02-18 16:18:15 +03:00

54 lines
1.1 KiB
YAML

language: php
dist: trusty
sudo: false
if: tag IS blank
php:
- 7.0
- 7.1
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=8000
- SERVER_URL=http://localhost
stages:
- test
- deploy
before_script: make before_script
script: composer test
after_success: bash <(curl -s https://codecov.io/bash)
jobs:
include:
- stage: deploy
before_script: skip
script: make build_archive
before_deploy:
- export VERSION=`cat VERSION`
- export ARCHIVE_NAME=/tmp/retailcrm-$VERSION.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
api_key: $GITHUB_OAUTH_TOKEN
skip_cleanup: true
file: $ARCHIVE_NAME
if: (branch = master) AND (type = push) AND (fork = false)
after_deploy: make delete_archive