Skip to content

Commit

Permalink
Add script to be able to run behat tests from other repos
Browse files Browse the repository at this point in the history
  • Loading branch information
andrerom committed Feb 25, 2015
1 parent 19f3d84 commit 82da711
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
4 changes: 0 additions & 4 deletions bin/.travis/prepare_testsystem.sh

This file was deleted.

28 changes: 28 additions & 0 deletions bin/.travis/setup_from_external_repo.sh
@@ -0,0 +1,28 @@
#!/bin/bash

# This script is meant to be reused from other repos that needs to run behat tests.
#
# Example use:
#
# before_install:
# - git fetch --unshallow && git checkout -b tmp_travis_branch
# - export BRANCH_BUILD_DIR=$TRAVIS_BUILD_DIR
# - export TRAVIS_BUILD_DIR="$HOME/build/ezpublish-community"
# - cd "$HOME/build"
# - git clone --depth 1 --single-branch --branch master https://github.com/ezsystems/ezpublish-community.git
# - cd ezpublish-community
# - ./bin/.travis/setup_from_external_repo.sh $BRANCH_BUILD_DIR "ezsystems/demobundle:dev-tmp_travis_branch"

REPO_DIR=$1
COMPOSER_REQUIRE=$2

./bin/.travis/prepare_system.sh
./bin/.travis/prepare_sahi.sh

echo "> Modify composer.json to point to local checkout"
sed -i '$d' composer.json
echo ', "repositories": [{"type":"git","url":"'$REPO_DIR'"}]}' >> composer.json
composer require --no-update "$COMPOSER_REQUIRE"
cat composer.json

./bin/.travis/prepare_ezpublish.sh

0 comments on commit 82da711

Please sign in to comment.