New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Support - with Solution] Best place to set BEHAT_PARAMS #93
Comments
There is several things mixed here: a) The easiest solution likely is just to source your script with parameters:
or
That will ensure that environment variables are exported correctly. b) You can set all those behat parameters already in a custom behat.yml.dist file including placeholders for all environment variables, see the test behat test in the drupal-7 / drupal-8 test directories: c) When you want to use the before or after functionality you can run in the same environment as the runner you want to extend, there is no need to --include that:
You need to uncomment that in your .travis.yml, then it will automatically find e.g. drupal_ti/before/runners/behat/script.sh and you can set environment variables there. Hope that helps! :) |
Thanks! I missed the BTW I have another confusion regarding the "before" script. You have asked to uncomment this:
But it seems like it is not considering the scripts. Where do I have to put this
I have also tried placing
But it is still not working. Only option to make it work is "including" it under |
Inside #!/bin/bash
# Add an optional statement to see that this is running in Travis CI.
echo "running drupal_ti/before/before_script.sh"
set -e $DRUPAL_TI_DEBUG
# Install list.js library.
cd "$DRUPAL_TI_DRUPAL_DIR/$DRUPAL_TI_LIBRARIES_DIR"
wget "https://github.com/javve/list.js/archive/v$DRUPAL_TI_LISTJS_VERSION.tar.gz"
tar -xzf "v$DRUPAL_TI_LISTJS_VERSION.tar.gz"
mv "list.js-$DRUPAL_TI_LISTJS_VERSION" "listjs"
# Enable required modules.
drush en -y "features"
drush en -y "views"
drush en -y "views_ui" |
Thanks for the awesome project. I'm struggling with the same issue as @subhojit777. I cannot make the autodiscovery work when using DRUPAL_TI_SCRIPT_DIR_BEFORE. I defined Do you have any suggestions? |
@szeidler I did like this https://github.com/subhojit777/listjs/blob/7.x-1.x/tests/behat.yml#L39 and asked Travis to run the specific profile like this https://github.com/subhojit777/listjs/blob/7.x-1.x/.travis.yml#L51 |
Inside
before_script
:And I have a file like this
drupal_ti/before/runners/behat/before_script.sh
:But it seems the
BEHAT_PARAMS
is not considered when the tests are run. And it fails with error:Any idea why this is happening?
As a workaround I am setting
BEHAT_PARAMS
underbefore_script
like this:The text was updated successfully, but these errors were encountered: