Enh: Dont run install before deploy stage

This commit is contained in:
Daniel Kesselberg 2018-08-24 21:24:38 +02:00
parent 32daccff3f
commit f59410deb6
3 changed files with 14 additions and 9 deletions

View File

@ -20,20 +20,19 @@ jobs:
include:
- stage: deploy
name: "Trigger build for external modules"
install: skip
script: .travis/trigger-modules.sh
install:
- .travis/install-dependencies.sh
- .travis/setup-humhub.sh
before_script:
script:
- '$HOME/chromedriver --url-base=/wd/hub &'
- 'php --server 127.0.0.1:8080 --docroot ${TRAVIS_BUILD_DIR} &>/dev/null &'
- 'sleep 5'
- 'curl --fail --head http://127.0.0.1:8080/index-test.php'
script:
- 'sleep 5 && curl --fail --head http://127.0.0.1:8080/index-test.php'
- 'cd protected/humhub/tests'
- 'php ../../vendor/bin/codecept build'
- 'php ../../vendor/bin/codecept run --env travis'
- cd ../../../
- 'cd ../../../'
after_failure:
- .travis/upload-failure.sh
env:

View File

@ -3,14 +3,20 @@
# -e = exit when one command returns != 0, -v print each command before executing
set -ev
# Install composer packages
composer install --prefer-dist --no-interaction
# Install node packages
npm install
# Build production assets
grunt build-assets
cd ${TRAVIS_BUILD_DIR}/protected/humhub/tests
# Create mysql database
mysql -e 'CREATE DATABASE humhub_test CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'
# Run migrations, setup humhub and rebuild search index
cd ${TRAVIS_BUILD_DIR}/protected/humhub/tests
php codeception/bin/yii migrate/up --includeModuleMigrations=1 --interactive=0
php codeception/bin/yii installer/auto
php codeception/bin/yii search/rebuild

View File

@ -3,13 +3,13 @@
# -e = exit when one command returns != 0, -v print each command before executing
set -ev
# early exit when pull request || early exit when not master
# early exit when pull request || when not master
if [ "${TRAVIS_PULL_REQUEST}" != "false" ] || [ "${TRAVIS_BRANCH}" != "master" ]; then
exit 0;
fi
# trigger build for calendar
curl -X POST \
curl -s -X POST \
https://api.travis-ci.org/repo/humhub%2Fhumhub-modules-calendar/requests \
-H 'Accept: application/json' \
-H 'Authorization: token '${AUTH_TOKEN} \