Merge pull request #3078 from danielkesselberg/master

Fix test suite
This commit is contained in:
Daniel Kesselberg 2018-03-05 22:31:53 +01:00 committed by GitHub
commit 9bcdee578f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 10 deletions

View File

@ -42,27 +42,27 @@ install:
# Run Composer update # Run Composer update
- travis_retry composer self-update && composer --version - travis_retry composer self-update && composer --version
- travis_retry composer global require "fxp/composer-asset-plugin:~1.3" - travis_retry composer global require "fxp/composer-asset-plugin:~1.3"
- export PATH="$HOME/.composer/vendor/bin:$PATH" - travis_retry composer install --prefer-dist --no-interaction
- travis_retry composer install --dev --prefer-dist --no-interaction # - travis_retry composer global require "codeception/codeception=2.3.*" "codeception/specify=*" "codeception/verify=*"
- travis_retry composer global require "codeception/codeception=2.3.*" "codeception/specify=*" "codeception/verify=*"
# Install test environment # Install test environment
- | - |
mysql -e 'CREATE DATABASE `humhub_test` CHARACTER SET utf8 COLLATE utf8_general_ci;' mysql -e 'CREATE DATABASE `humhub_test` CHARACTER SET utf8 COLLATE utf8_general_ci;'
cd protected/humhub/tests cd $TRAVIS_BUILD_DIR/protected/humhub/tests
php codeception/bin/yii migrate/up --includeModuleMigrations=1 --interactive=0 php codeception/bin/yii migrate/up --includeModuleMigrations=1 --interactive=0
php codeception/bin/yii installer/auto php codeception/bin/yii installer/auto
php codeception/bin/yii search/rebuild php codeception/bin/yii search/rebuild
codecept build php ../../vendor/bin/codecept build
cd ../../../
script: script:
- php -S 127.0.0.1:8080 &> /dev/null & - |
cd $TRAVIS_BUILD_DIR
php -S 127.0.0.1:8080 &> /dev/null &
#- phantomjs --webdriver=4444 > /dev/null 2>&1 & # Not in use since phantomjs hangs with QIODevice::write (QTcpSocket): device not open #- phantomjs --webdriver=4444 > /dev/null 2>&1 & # Not in use since phantomjs hangs with QIODevice::write (QTcpSocket): device not open
- sleep 5 - sleep 5
- curl -I http://127.0.0.1:8080/index-test.php - curl --fail http://127.0.0.1:8080/index-test.php
- | - |
cd protected/humhub/tests/ cd $TRAVIS_BUILD_DIR/protected/humhub/tests
codecept run php ../../vendor/bin/codecept run
after_failure: after_failure:
- cd ../modules/user/tests/codeception/_output/ - cd ../modules/user/tests/codeception/_output/
- ls - ls

View File

@ -56,6 +56,8 @@
}, },
"require-dev": { "require-dev": {
"codeception/codeception": "~2.3", "codeception/codeception": "~2.3",
"codeception/specify": "~0.4 || ~1.0",
"codeception/verify": "~0.4 || ~1.0",
"yiisoft/yii2-debug": "~2.0.0", "yiisoft/yii2-debug": "~2.0.0",
"yiisoft/yii2-gii": "~2.0.0", "yiisoft/yii2-gii": "~2.0.0",
"yiisoft/yii2-faker": "~2.0.0", "yiisoft/yii2-faker": "~2.0.0",