Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Merge requests
!11841
Repeat test
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Closed
Repeat test
issue/drupal-3354138:3354138-repeat
into
11.x
Overview
0
Commits
1
Pipelines
1
Changes
2
Closed
Repeat test
Michael Strelan
requested to merge
issue/drupal-3354138:3354138-repeat
into
11.x
3 months ago
Overview
0
Commits
1
Pipelines
1
Changes
2
Closes
#3354138
0
0
Merge request reports
Compare
11.x
11.x (base)
and
latest version
latest version
c641004d
1 commit,
3 months ago
2 files
+
2
−
420
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Conflict: This file was modified in both the source and target branches. Ask someone with write access to resolve it.
.gitlab-ci/pipeline.yml
+
2
−
142
View file @ c641004d
Edit in single-file editor
Open in Web IDE
Show full file
@@ -126,151 +126,11 @@ variables:
# Documentation: https://docs.gitlab.com/ee/ci/jobs/
################
'
🩹
Test-only
changes'
:
<<
:
[
*with-composer
,
*default-job-settings
]
when
:
manual
allow_failure
:
true
services
:
-
<<
:
*with-database
-
<<
:
*with-selenium-chrome
script
:
-
$CI_PROJECT_DIR/.gitlab-ci/scripts/test-only.sh
'
🖱️️️
PHPUnit
Functional
Javascript'
:
<<
:
[
*with-composer
,
*run-tests
,
*default-job-settings
]
parallel
:
3
variables
:
TESTSUITE
:
PHPUnit-FunctionalJavascript
CONCURRENCY
:
5
KUBERNETES_CPU_REQUEST
:
"
16"
services
:
-
<<
:
*with-database
-
<<
:
*with-selenium-chrome
after_script
:
-
echo $MINK_DRIVER_ARGS_WEBDRIVER
-
sed -i "s#$CI_PROJECT_DIR/##" ./sites/default/files/simpletest/phpunit-*.xml ||
true
-
cp /builds/chromedriver.log ./
'
👷️️️
PHPUnit
Build'
:
<<
:
[
*with-composer
,
*run-tests
,
*default-job-settings
]
variables
:
TESTSUITE
:
PHPUnit-Build
KUBERNETES_CPU_REQUEST
:
"
8"
CONCURRENCY
:
"
5"
services
:
-
<<
:
*with-database
'
🌐️️
PHPUnit
Functional'
:
<<
:
[
*with-composer
,
*run-tests
,
*default-job-settings
]
parallel
:
8
variables
:
TESTSUITE
:
PHPUnit-Functional
CONCURRENCY
:
"
5"
KUBERNETES_CPU_REQUEST
:
"
16"
services
:
-
<<
:
*with-database
'
⚙️️
PHPUnit
Kernel'
:
<<
:
[
*with-composer
,
*run-tests
,
*default-job-settings
]
parallel
:
5
variables
:
TESTSUITE
:
PHPUnit-Kernel
KUBERNETES_CPU_REQUEST
:
"
8"
CONCURRENCY
:
12
services
:
-
<<
:
*with-database
'
🦉️️️
Nightwatch'
:
<<
:
[
*with-composer-and-yarn
,
*default-job-settings
]
variables
:
KUBERNETES_CPU_REQUEST
:
"
16"
services
:
-
<<
:
*with-database
-
<<
:
*with-selenium-chrome
script
:
-
export DRUPAL_TEST_DB_URL=$SIMPLETEST_DB
-
cp ./core/.env.example ./core/.env
# dotenv-safe/config does not support environment variables
# @see https://github.com/rolodato/dotenv-safe/issues/126
# @todo move this to `variables` when the above is resolved
-
echo "DRUPAL_TEST_BASE_URL='http://localhost/subdirectory'" >> ./core/.env
-
echo "DRUPAL_TEST_CHROMEDRIVER_AUTOSTART=false" >> ./core/.env
-
echo "DRUPAL_TEST_DB_URL='${DRUPAL_TEST_DB_URL}'" >> ./core/.env
-
echo "DRUPAL_TEST_WEBDRIVER_HOSTNAME='selenium'" >> ./core/.env
-
echo "DRUPAL_TEST_WEBDRIVER_CHROME_ARGS='--disable-dev-shm-usage --disable-gpu --headless --dns-prefetch-disable'" >> ./core/.env
-
echo "DRUPAL_TEST_WEBDRIVER_W3C=true" >> ./core/.env
-
echo "DRUPAL_TEST_WEBDRIVER_PORT='4444'" >> ./core/.env
-
echo "DRUPAL_NIGHTWATCH_OUTPUT='"../nightwatch_output"'" >> ./core/.env
-
echo "COLUMNS=1000" >> ./core/.env
-
chown -R www-data:www-data ./sites /var/www
-
cd core
-
corepack enable
-
sudo -u www-data -E -H yarn run test:nightwatch --workers=3
after_script
:
-
cp /builds/chromedriver.log ./
artifacts
:
when
:
always
expire_in
:
6 mos
reports
:
junit
:
./nightwatch_output/**/*.xml
paths
:
-
./nightwatch_output
-
'
*.log'
'
🖱️️️
PHPUnit
Functional
Javascript
(non
W3C
legacy)'
:
<<
:
[
*with-composer
,
*default-job-settings
]
parallel
:
1
variables
:
TESTSUITE
:
PHPUnit-FunctionalJavascript
CONCURRENCY
:
6
KUBERNETES_CPU_REQUEST
:
"
16"
MINK_DRIVER_ARGS_WEBDRIVER
:
$MINK_DRIVER_ARGS_WEBDRIVER_CHROMEDRIVER_NON_W3C
services
:
-
<<
:
*with-database
-
<<
:
*with-chrome
script
:
# Run a small subset of tests to prove non W3C testing still works.
-
sudo -u www-data -E -H php ./core/scripts/run-tests.sh --color --keep-results --types "$TESTSUITE" --concurrency "$CONCURRENCY" --repeat "1" --sqlite "./sites/default/files/tests.sqlite" --dburl $SIMPLETEST_DB --url $SIMPLETEST_BASE_URL --verbose --non-html javascript
after_script
:
-
sed -i "s#$CI_PROJECT_DIR/##" ./sites/default/files/simpletest/phpunit-*.xml ||
true
-
cp /builds/chromedriver.log ./
'
🔁
Repeat
Class
Test'
:
<<
:
[
*with-composer
,
*run-repeat-class-test
,
*default-job-settings
]
when
:
manual
allow_failure
:
true
variables
:
REPEAT_TEST_CLASS
:
'
Drupal\Tests\
Change\Me
'
REPEAT_COUNT
:
1
00
REPEAT_TEST_CLASS
:
'
\
Drupal\Tests\
menu_ui\Functional\MenuUiTest
'
REPEAT_COUNT
:
5
00
services
:
-
<<
:
*with-database
-
<<
:
*with-selenium-chrome
'
🚲
Performance
tests'
:
<<
:
[
*default-job-settings
]
rules
:
-
if
:
$PERFORMANCE_TEST == "1"
-
when
:
manual
allow_failure
:
true
variables
:
KUBERNETES_CPU_REQUEST
:
"
24"
MINK_DRIVER_ARGS_WEBDRIVER
:
'
["chrome",
{"browserName":"chrome","goog:chromeOptions":{"args":["--disable-dev-shm-usage","--disable-gpu","--headless","--no-sandbox"]}},
"http://chrome:9515"]'
tags
:
-
performance-test-runner
services
:
-
<<
:
*with-database
-
<<
:
*with-chrome
script
:
# Determine DB driver.
-
|
[[ $_TARGET_DB == sqlite* ]] && export SIMPLETEST_DB=sqlite://localhost/subdirectory/sites/default/files/db.sqlite?module=sqlite
[[ $_TARGET_DB == mysql* ]] && export SIMPLETEST_DB=mysql://$MYSQL_USER:$MYSQL_PASSWORD@database/$MYSQL_DATABASE?module=mysql
[[ $_TARGET_DB == mariadb* ]] && export SIMPLETEST_DB=mysql://$MYSQL_USER:$MYSQL_PASSWORD@database/$MYSQL_DATABASE?module=mysql
[[ $_TARGET_DB == pgsql* ]] && export SIMPLETEST_DB=pgsql://$POSTGRES_USER:$POSTGRES_PASSWORD@database/$POSTGRES_DB?module=pgsql
-
composer install --optimize-autoloader
-
export OTEL_COLLECTOR="$OTEL_COLLECTOR"
-
mkdir -p ./sites/simpletest ./sites/default/files ./build/logs/junit /var/www/.composer
-
chown -R www-data:www-data ./sites ./build/logs/junit ./vendor /var/www/
-
sudo -u www-data git config --global --add safe.directory $CI_PROJECT_DIR
-
sudo SIMPLETEST_BASE_URL="http://$HOSTNAME/subdirectory" -u www-data -E -H ./vendor/bin/phpunit -c core --group OpenTelemetry --log-junit=./sites/default/files/simpletest/phpunit-performance.xml
Loading