opencart-module/.travis.yml

82 lines
1.7 KiB
YAML
Raw Permalink Normal View History

2018-06-13 16:13:08 +03:00
language: php
2019-07-18 12:51:58 +03:00
dist: trusty
2018-06-13 16:13:08 +03:00
sudo: false
2020-02-18 14:28:55 +03:00
if: tag IS blank
2018-06-13 16:13:08 +03:00
env:
2018-06-13 16:26:07 +03:00
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
2018-06-13 17:18:06 +03:00
- OC_EMAIL=test@test.com
2018-06-13 16:26:07 +03:00
- SERVER_PORT=8000
- SERVER_URL=http://localhost
2018-06-13 16:13:08 +03:00
2020-02-18 11:27:56 +03:00
stages:
- test
- deploy
2020-02-19 15:17:18 +03:00
before_install:
- export LAST_TAG=`git describe --abbrev=0 --tags`
- export CURRENT_VERSION=v`cat VERSION`
2020-02-18 11:39:43 +03:00
before_script: make before_script
script: composer test
2020-02-18 18:17:59 +03:00
after_success:
2020-02-19 17:29:21 +03:00
- make coverage
2020-02-18 18:17:59 +03:00
- bash <(curl -s https://codecov.io/bash)
2020-02-18 16:18:15 +03:00
2020-02-18 00:11:29 +03:00
jobs:
include:
2020-02-19 10:50:24 +03:00
- php: 7.0
2020-02-19 11:49:32 +03:00
env:
- TEST_SUITE=2.3
- OPENCART=2.3
2020-02-19 10:50:24 +03:00
- php: 7.1
2020-02-19 11:49:32 +03:00
env:
- TEST_SUITE=2.3
- OPENCART=2.3
2020-02-19 12:09:17 +03:00
- php: 7.0
env:
- TEST_SUITE=3.0
- OPENCART=3.0
- php: 7.1
env:
- TEST_SUITE=3.0
- OPENCART=3.0
2020-02-19 10:50:24 +03:00
- php: 7.2
2020-02-19 11:49:32 +03:00
env:
2020-02-19 12:09:17 +03:00
- TEST_SUITE=3.0
- OPENCART=3.0
2020-02-19 10:50:24 +03:00
- php: 7.3
2020-02-19 11:49:32 +03:00
env:
2020-02-19 12:09:17 +03:00
- TEST_SUITE=3.0
- OPENCART=3.0
2020-02-18 12:53:31 +03:00
- stage: deploy
before_script: skip
2020-02-18 14:28:55 +03:00
script: make build_archive
2020-02-18 13:09:49 +03:00
before_deploy:
- export VERSION=`cat VERSION`
2020-02-19 15:47:19 +03:00
- export ARCHIVE_NAME=/tmp/retailcrm-$VERSION.ocmod.zip
2020-02-18 13:09:49 +03:00
- git config --local user.name "retailCRM"
- git config --local user.email "support@retailcrm.ru"
- export TRAVIS_TAG=v$VERSION
- git tag $TRAVIS_TAG
2020-02-18 10:11:51 +03:00
deploy:
provider: releases
api_key: $GITHUB_OAUTH_TOKEN
skip_cleanup: true
file: $ARCHIVE_NAME
2020-02-19 16:53:05 +03:00
on:
condition: "$LAST_TAG != $CURRENT_VERSION"
2020-02-19 16:58:45 +03:00
if: branch = master AND type = push AND fork = false
2020-02-18 12:53:31 +03:00
after_deploy: make delete_archive