Add recipes path handling
Problem/Motivation
When this template is applied to a Recipe project, the symlink is placed in web/modules/custom/. If using the GenericTest.php, the project path cannot find the other recipes.
Proposed resolution
- Introduce a new project type of "recipe"
- As recipes do not have a .info.yml to read the type, detect if a
recipe.ymlfile exists - The environment variable
$PROJECT_TYPEcan still be used to preset or override the type - Introduce a new variale
$DRUPAL_RECIPES_PATHwhich is the path from the build root to the recipes folder. The default is 'recipes' - If the project is a recipe then no value is set for
$DRUPAL_PROJECTS_PATH - The exitsing variable
$DRUPAL_PROJECT_FOLDERremains as the full absolute path to the deeper-level project folder being tested. - For modules, themes and profiles, the value is
$CI_PROJECT_DIR/$DRUPAL_PROJECTS_PATH/$PROJECT_NAME, for example/builds/project/my_theme/web/themes/custom/my_theme - For recipes the value is
$CI_PROJECT_DIR/$DRUPAL_RECIPES_PATH/$PROJECT_NAME, for example/builds/project/my_recipe/recipes/my_recipe - As recipe test files need to be real, not symlinks, at the start of the recipe phpunit job the project's /test/ folder symlinks are replaced by copying the real files
Edited by drupalbot