opencart-module/.travis.yml
Akolzin Dmitry 2f099d477c fix
2020-02-18 10:19:05 +03:00

52 lines
1.1 KiB
YAML

language: php
dist: trusty
sudo: false
php:
- 7.0
- 7.1
env:
global:
- ROBO_CONFIG=$(TRAVIS_BUILD_DIR)/tests/robo.yml
- 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
before_script:
# Change MySQL root password
- echo "USE mysql;\nUPDATE user SET password=PASSWORD('root') WHERE user='root';\nFLUSH PRIVILEGES;\n" | mysql -u root
- composer install
- composer setup
- bin/robo --load-from tests/RoboFile.php project:deploy
- (php -S localhost:8000 -t www &) 2> /dev/null > /dev/null
- sleep 2
script:
- composer test
jobs:
include:
- stage: GitHub Release
script: make build_archive
before_deploy:
- export VERSION = `cat VERSION`
- export ARCHIVE_NAME = '/tmp/retailcrm-'$(VERSION)'.zip'
deploy:
provider: releases
api_key: $GITHUB_OAUTH_TOKEN
skip_cleanup: true
file: $ARCHIVE_NAME
on:
php: 7.1
branch: master