forked from ezsystems/ezpublish-kernel
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ezsystems#1199 from ezsystems/behat_testing
Add light Behat testing to kernel repo
- Loading branch information
Showing
4 changed files
with
63 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/sh | ||
|
||
# File for setting up system for behat testing, just like done in DemoBundle's .travis.yml | ||
|
||
export BRANCH_BUILD_DIR=$TRAVIS_BUILD_DIR | ||
export TRAVIS_BUILD_DIR="$HOME/build/ezpublish-community" | ||
cd "$HOME/build" | ||
|
||
# Change the branch and/or remote to use a different ezpublish branch/distro | ||
git clone --depth 1 --single-branch --branch master https://github.com/ezsystems/ezpublish-community.git | ||
cd ezpublish-community | ||
|
||
# Use this if you depend on another branch for a dependency (only works for the ezsystems remote) | ||
# (note that packagist may take time to update the references, leading to errors. Just retrigger the build) | ||
# | ||
# Example: | ||
# composer require --no-update ezsystems/DemoBundle:dev-MyCustomBranch | ||
|
||
# Prepare system (Apache, Mysql, Sahi/Selenium, eZ Publish) | ||
./bin/.travis/prepare_system.sh | ||
./bin/.travis/prepare_testsystem.sh | ||
./bin/.travis/prepare_ezpublish.sh | ||
|
||
# Replace kernel with the one from pull-request/current checkout | ||
rm -rf vendor/ezsystems/ezpublish-kernel | ||
mv "$BRANCH_BUILD_DIR" vendor/ezsystems/ezpublish-kernel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/sh | ||
|
||
# File for setting up system for unit/integration testing | ||
|
||
# Disable xdebug to speed things up as we don't currently generate coverge on travis | ||
if [ "$TRAVIS_PHP_VERSION" != "hhvm" ] ; then phpenv config-rm xdebug.ini ; fi | ||
|
||
# Setup DB | ||
if [ "$DB" = "mysql" ] ; then mysql -e "CREATE DATABASE IF NOT EXISTS $DB_NAME;" -uroot ; fi | ||
if [ "$DB" = "postgresql" ] ; then psql -c "CREATE DATABASE $DB_NAME;" -U postgres ; psql -c "CREATE EXTENSION pgcrypto;" -U postgres $DB_NAME ; fi | ||
|
||
# Setup github key to avoid api rate limit | ||
./bin/.travis/install_composer_github_key.sh | ||
|
||
# Switch to another Symfony version if asked for | ||
if [ "$SYMFONY_VERSION" != "" ] ; then composer require --no-update symfony/symfony=$SYMFONY_VERSION ; fi; | ||
|
||
# Install packages using composer | ||
composer install --prefer-dist | ||
|
||
# Setup Solr / Elastic search if asked for | ||
if [ "$TEST_CONFIG" = "phpunit-integration-legacy-elasticsearch.xml" ] ; then ./bin/.travis/init_elasticsearch.sh ; fi | ||
if [ "$TEST_CONFIG" = "phpunit-integration-legacy-solr.xml" ] ; then curl -L https://raw.github.com/andrerom/travis-solr/410/travis-solr.sh | SOLR_CONFS=eZ/Publish/Core/Search/Solr/Content/schema.xml bash ; fi |