Comments (5)
@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
from drupal_ti.
There is several things mixed here:
a) The easiest solution likely is just to source your script with parameters:
- . behat-params.sh
or
- source ./behat-params.sh
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:
- DRUPAL_TI_SCRIPT_DIR_BEFORE="./drupal_ti/before"
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! :)
from drupal_ti.
Thanks! I missed the behat.yml.dist
in the README. That really helped and it is working.
BTW I have another confusion regarding the "before" script. You have asked to uncomment this:
- DRUPAL_TI_SCRIPT_DIR_BEFORE="./drupal_ti/before"
But it seems like it is not considering the scripts. Where do I have to put this drupal_ti
directory. Currently it is placed just under my module's directory like this:
mymodule
- tests/
- drupal_ti/
- mymodule.info
- mymodule.module
I have also tried placing drupal_ti
under tests
directory, and changed DRUPAL_TI_SCRIPT_DIR_BEFORE
this to:
- DRUPAL_TI_SCRIPT_DIR_BEFORE="./tests/drupal_ti/before"
But it is still not working. Only option to make it work is "including" it under before_script
. Am I doing something wrong?
from drupal_ti.
Inside before_script.sh
:
#!/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"
from drupal_ti.
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 - DRUPAL_TI_SCRIPT_DIR_BEFORE="./tests/drupal_ti/before"
and have the script placed in tests/drupal_ti/before/runners/behat/before_script.sh
. But it's not taken into account.
Do you have any suggestions?
from drupal_ti.
Related Issues (20)
- Does not work with 8.3.x branch HOT 5
- [Support - Request] Best way to enable test module using Behat HOT 1
- Doesn't work with Drupal 8.6
- Composer 1.8.x - drupal-ti: command not found
- Project Maintenance Inquiry HOT 3
- Getting error "Canβt connect to local MySQL server through socket"
- Drupal 8.8 on travis: Script "drupal-phpunit-upgrade" is not defined in this package
- Add maintainers HOT 4
- Incorrect drush version installed after specifying DRUPAL_TI_DRUSH_VERSION
- phpunit Kernel tests are run twice HOT 2
- Document DRUPAL_TI_DRUPAL_CORE_VERSION parameter
- Build error, requirements could not be resolved HOT 3
- Tag 1.4.3 HOT 2
- Error running my first test HOT 7
- Problem with BrowserTestBase HOT 1
- Add a functional test run via phpunit-core to drupal 8 test suite
- New icon for drupal_ti HOT 1
- Install a non-Drupal library in vendor/ HOT 3
- Module linking with composer means travis test wrong branch HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from drupal_ti.