update travis config

This commit is contained in:
Akolzin Dmitry 2020-02-18 10:50:40 +03:00
parent de3a1ae7e7
commit c8690e8252
2 changed files with 15 additions and 16 deletions

View File

@ -22,26 +22,16 @@ env:
- 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: test
script: composer test
before_script: make before_script
- stage: GitHub Release
script: make build_archive
before_deploy:
- export VERSION = `cat VERSION`
- export ARCHIVE_NAME = '/tmp/retailcrm-'$(VERSION)'.zip'
- export VERSION=`cat VERSION`
- export ARCHIVE_NAME='/tmp/retailcrm-'$(VERSION)'.zip'
deploy:
provider: releases
api_key: $GITHUB_OAUTH_TOKEN

View File

@ -11,4 +11,13 @@ send_to_ftp:
curl -T $(ARCHIVE_NAME) -u $(FTP_USER):$(FTP_PASSWORD) ftp://$(FTP_HOST)
delete_archive:
rm -f $(ARCHIVE_NAME)
rm -f $(ARCHIVE_NAME)
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