From c8690e8252926de72b2ed4ceb33f06398da852fe Mon Sep 17 00:00:00 2001 From: Akolzin Dmitry Date: Tue, 18 Feb 2020 10:50:40 +0300 Subject: [PATCH] update travis config --- .travis.yml | 20 +++++--------------- Makefile | 11 ++++++++++- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index f5f882e..f78fa1f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/Makefile b/Makefile index 779039e..1bd8b47 100644 --- a/Makefile +++ b/Makefile @@ -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) \ No newline at end of file + 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 \ No newline at end of file