Skip to content
Snippets Groups Projects

Draft: #3221881: Gitlab testing [MR120 - 7.x]

Compare and
1 file
+ 39
18
Compare changes
  • Side-by-side
  • Inline
+ 39
18
@@ -6,6 +6,11 @@ include:
@@ -6,6 +6,11 @@ include:
################
################
- project: $_GITLAB_TEMPLATES_REPO
- project: $_GITLAB_TEMPLATES_REPO
ref: $_GITLAB_TEMPLATES_REF
ref: $_GITLAB_TEMPLATES_REF
 
 
# MR
 
# - project: issue/gitlab_templates-nnnnnnn
 
# ref:
 
file:
file:
- '/includes/include.drupalci.main-d7.yml'
- '/includes/include.drupalci.main-d7.yml'
- '/includes/include.drupalci.variables.yml'
- '/includes/include.drupalci.variables.yml'
@@ -15,6 +20,14 @@ variables:
@@ -15,6 +20,14 @@ variables:
_SHOW_ENVIRONMENT_VARIABLES: 1
_SHOW_ENVIRONMENT_VARIABLES: 1
OPT_IN_TEST_MAX_PHP: 1
OPT_IN_TEST_MAX_PHP: 1
 
# If the MR has changes to a file that is retrieved via curl then specify these two CURL_TEMPLATES variables to match the repo and ref above.
 
# Better to have any value here, even if it does not match the values above, because any MR is likely to be more up-to-date than 'default-ref'.
 
# _CURL_TEMPLATES_REPO: issue/gitlab_templates-3440136
 
# _CURL_TEMPLATES_REF: 3440136-deprecation-warnings
 
 
SKIP_PHPCS: 0
 
SKIP_PHPUNIT: 0
 
# -------------------------------- BUILD ---------------------------------------
# -------------------------------- BUILD ---------------------------------------
.skip-and-opt-in-debug: &skip-and-opt-in-debug
.skip-and-opt-in-debug: &skip-and-opt-in-debug
@@ -29,12 +42,24 @@ variables:
@@ -29,12 +42,24 @@ variables:
echo "_GITLAB_TEMPLATES_REF = $_GITLAB_TEMPLATES_REF"
echo "_GITLAB_TEMPLATES_REF = $_GITLAB_TEMPLATES_REF"
echo "_CURL_TEMPLATES_REF = $_CURL_TEMPLATES_REF"
echo "_CURL_TEMPLATES_REF = $_CURL_TEMPLATES_REF"
 
.show-variables: &show-variables
 
- |
 
printf "CI_PIPELINE_SOURCE = %s\n" $CI_PIPELINE_SOURCE &&
 
printf "CI_DEFAULT_BRANCH = %s\n" $CI_DEFAULT_BRANCH &&
 
printf "CI_COMMIT_BRANCH = %s\n" $CI_COMMIT_BRANCH &&
 
printf "CI_COMMIT_TAG = %s\n" $CI_COMMIT_TAG &&
 
printf "CI_MERGE_REQUEST_IID = %s\n" $CI_MERGE_REQUEST_IID &&
 
printf "CI_PROJECT_ROOT_NAMESPACE = %s\n" $CI_PROJECT_ROOT_NAMESPACE &&
 
printf "CI_PAGES_URL = %s\n" $CI_PAGES_URL
 
.composer-base:
.composer-base:
after_script:
after_script:
- *skip-and-opt-in-debug
- *skip-and-opt-in-debug
# Show the last three commits. Current directory /builds/project/scheduler ($CI_PROJECT_DIR) is correct.
# Show the last two commits. Current directory /builds/project/scheduler ($CI_PROJECT_DIR) is correct.
- pwd
- pwd
- git show -3 --stat
- git show -2 --stat
 
- COLUMNS=120 composer show | grep -E '\/(drupal|rules|entity|date|drush)'
 
- vendor/bin/drush status
# Third-party modules loaded via the projects composer.json will be in
# Third-party modules loaded via the projects composer.json will be in
# vendor/drupal but they need to be moved into sites/all/modules.
# vendor/drupal but they need to be moved into sites/all/modules.
# The 'drupal' and 'coder' directories must not be moved.
# The 'drupal' and 'coder' directories must not be moved.
@@ -44,6 +69,10 @@ variables:
@@ -44,6 +69,10 @@ variables:
- ls $CI_PROJECT_DIR/vendor/drupal
- ls $CI_PROJECT_DIR/vendor/drupal
- ls $CI_PROJECT_DIR/$_WEB_ROOT/sites/all/modules
- ls $CI_PROJECT_DIR/$_WEB_ROOT/sites/all/modules
 
composer:
 
variables:
 
PHP_VERSION: 8.1
 
# -------------------------------- VALIDATE ------------------------------------
# -------------------------------- VALIDATE ------------------------------------
phpcs:
phpcs:
@@ -51,7 +80,7 @@ phpcs:
@@ -51,7 +80,7 @@ phpcs:
# -------------------------------- TEST ----------------------------------------
# -------------------------------- TEST ----------------------------------------
.scheduler-matrix: &scheduler-matrix
phpunit:
parallel:
parallel:
matrix:
matrix:
# Run test classes in parallel.
# Run test classes in parallel.
@@ -60,18 +89,10 @@ phpcs:
@@ -60,18 +89,10 @@ phpcs:
- SchedulerDateModuleTest
- SchedulerDateModuleTest
- SchedulerRulesTest
- SchedulerRulesTest
- SchedulerApiTestCase
- SchedulerApiTestCase
before_script:
.scheduler-phpunit-rule: &scheduler-phpunit-rule
- echo "_PHPUNIT_PARAMETERS=$_PHPUNIT_PARAMETERS, _PHPUNIT_TESTGROUPS=$_PHPUNIT_TESTGROUPS"
- variables:
- echo "_MATRIX_VALUE=$_MATRIX_VALUE, _PHPUNIT_EXTRA=$_PHPUNIT_EXTRA"
# Specify parameters that will be passed to RUN-TESTS.SH
- echo "_D7_DRUPAL_TEST_DEPENDENCIES=$_D7_DRUPAL_TEST_DEPENDENCIES"
_PHPUNIT_EXTRA: --class $_MATRIX_VALUE $_PHPUNIT_PARAMETERS
# Specify parameters that will be passed to RUN-TESTS.SH (without --group)
- export _PHPUNIT_EXTRA="$_PHPUNIT_EXTRA --class $_MATRIX_VALUE $_PHPUNIT_PARAMETERS"
phpunit:
- echo "End of before_script _PHPUNIT_EXTRA=$_PHPUNIT_EXTRA"
<<: *scheduler-matrix
rules:
- !reference [ .skip-phpunit-rule ]
- *scheduler-phpunit-rule
- when: on_success
after_script:
- pwd
- printf "_PHPUNIT_EXTRA=$_PHPUNIT_EXTRA\n_MATRIX_VALUE=$_MATRIX_VALUE\n_PHPUNIT_PARAMETERS=$_PHPUNIT_PARAMETERS"
Loading