Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gitlab_ci_testbed_for_drupal_core
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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
gitlab_ci_testbed_for_drupal_core
Commits
c7b7c9d5
Commit
c7b7c9d5
authored
1 year ago
by
Lee Rowlands
Committed by
Fran Garcia-Linares
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
#3375827
Fixing tests
parent
dfe2ab42
No related branches found
No related tags found
1 merge request
!5
#3375827 Fixing tests
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+36
-0
36 additions, 0 deletions
.gitlab-ci.yml
.gitlab-ci/pipeline.yml
+8
-6
8 additions, 6 deletions
.gitlab-ci/pipeline.yml
with
44 additions
and
6 deletions
.gitlab-ci.yml
+
36
−
0
View file @
c7b7c9d5
...
...
@@ -94,6 +94,7 @@ variables:
_TARGET_PHP
:
"
8.1"
_TARGET_DB_TYPE
:
"
mysql"
_TARGET_DB_VERSION
:
"
5.7"
_DB_IMAGE
:
$_CONFIG_DOCKERHUB_ROOT/$_TARGET_DB_TYPE-$_TARGET_DB_VERSION:production
trigger
:
# Rely on the status of the child pipeline.
strategy
:
depend
...
...
@@ -108,6 +109,7 @@ variables:
_TARGET_PHP
:
"
8.1"
_TARGET_DB_TYPE
:
"
mysql"
_TARGET_DB_VERSION
:
"
8"
_DB_IMAGE
:
$_CONFIG_DOCKERHUB_ROOT/$_TARGET_DB_TYPE-$_TARGET_DB_VERSION:production
trigger
:
# Rely on the status of the child pipeline.
strategy
:
depend
...
...
@@ -123,6 +125,7 @@ variables:
_TARGET_PHP
:
"
8.1"
_TARGET_DB_TYPE
:
"
pgsql"
_TARGET_DB_VERSION
:
"
13.5"
_DB_IMAGE
:
$_CONFIG_DOCKERHUB_ROOT/$_TARGET_DB_TYPE-$_TARGET_DB_VERSION:production
trigger
:
# Rely on the status of the child pipeline.
strategy
:
depend
...
...
@@ -138,6 +141,7 @@ variables:
_TARGET_PHP
:
"
8.1"
_TARGET_DB_TYPE
:
"
pgsql"
_TARGET_DB_VERSION
:
"
14.1"
_DB_IMAGE
:
$_CONFIG_DOCKERHUB_ROOT/$_TARGET_DB_TYPE-$_TARGET_DB_VERSION:production
trigger
:
# Rely on the status of the child pipeline.
strategy
:
depend
...
...
@@ -146,3 +150,35 @@ variables:
rules
:
-
if
:
$CI_PIPELINE_SOURCE == "merge_request_event"
when
:
manual
# 'PHP 8.1 SQLite 3.26.0':
# stage: test
# variables:
# _TARGET_PHP: "8.1"
# _TARGET_DB_TYPE: "sqlite"
# _TARGET_DB_VERSION: "3.26.0"
# _DB_IMAGE: $_CONFIG_DOCKERHUB_ROOT/php-$_TARGET_PHP-apache:production
# trigger:
# # Rely on the status of the child pipeline.
# strategy: depend
# include:
# - local: .gitlab-ci/pipeline.yml
# rules:
# - if: $CI_PIPELINE_SOURCE == "merge_request_event"
# when: manual
# 'PHP 8.1 MariaDB 10.3.22':
# stage: test
# variables:
# _TARGET_PHP: "8.1"
# _TARGET_DB_TYPE: "mariadb"
# _TARGET_DB_VERSION: "10.3.22"
# _DB_IMAGE: $_CONFIG_DOCKERHUB_ROOT/$_TARGET_DB_TYPE-$_TARGET_DB_VERSION:production
# trigger:
# # Rely on the status of the child pipeline.
# strategy: depend
# include:
# - local: .gitlab-ci/pipeline.yml
# rules:
# - if: $CI_PIPELINE_SOURCE == "merge_request_event"
# when: manual
This diff is collapsed.
Click to expand it.
.gitlab-ci/pipeline.yml
+
8
−
6
View file @
c7b7c9d5
...
...
@@ -140,7 +140,7 @@ stages:
MINK_DRIVER_ARGS_WEBDRIVER
:
'
["chrome",
{"browserName":"chrome","chromeOptions":{"args":["--disable-dev-shm-usage","--disable-gpu","--headless"]}},
"http://localhost:9515"]'
.with-database
:
&with-database
name
:
$_
CONFIG_DOCKERHUB_ROOT/$_TARGET_DB_TYPE-$_TARGET_DB_VERSION:production
name
:
$_
DB_IMAGE
alias
:
database
.with-chrome
:
&with-chrome
...
...
@@ -172,11 +172,12 @@ stages:
script
:
# Determine DB driver.
-
|
[[ $_TARGET_DB_TYPE == "sqlite" ]] && export SIMPLETEST_DB=sqlite://localhost/sites/default/files/.sqlite
[[ $_TARGET_DB_TYPE == "sqlite" ]] && export SIMPLETEST_DB=sqlite://localhost/
subdirectory/
sites/default/files/
db
.sqlite
[[ $_TARGET_DB_TYPE == "mysql" ]] && export SIMPLETEST_DB=mysql://$MYSQL_USER:$MYSQL_PASSWORD@database/$MYSQL_DATABASE
[[ $_TARGET_DB_TYPE == "mariadb" ]] && export SIMPLETEST_DB=mysql://$MYSQL_USER:$MYSQL_PASSWORD@database/$MYSQL_DATABASE
[[ $_TARGET_DB_TYPE == "pgsql" ]] && export SIMPLETEST_DB=pgsql://$POSTGRES_USER:$POSTGRES_PASSWORD@database/$POSTGRES_DB
-
export
-
mkdir -p ./sites/simpletest ./build/logs/junit /var/www/.composer
-
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
# We need to pass this along directly even though it's set in the environment parameters.
...
...
@@ -349,8 +350,9 @@ stages:
script
:
# Determine DB driver.
-
|
[[ $_TARGET_DB_TYPE == "sqlite" ]] && export DRUPAL_TEST_DB_URL=sqlite://localhost/sites/default/files/.sqlite
[[ $_TARGET_DB_TYPE == "sqlite" ]] && export DRUPAL_TEST_DB_URL=sqlite://localhost/
subdirectory/
sites/default/files/
db
.sqlite
[[ $_TARGET_DB_TYPE == "mysql" ]] && export DRUPAL_TEST_DB_URL=mysql://$MYSQL_USER:$MYSQL_PASSWORD@database/$MYSQL_DATABASE
[[ $_TARGET_DB_TYPE == "mariadb" ]] && export DRUPAL_TEST_DB_URL=mysql://$MYSQL_USER:$MYSQL_PASSWORD@database/$MYSQL_DATABASE
[[ $_TARGET_DB_TYPE == "pgsql" ]] && export DRUPAL_TEST_DB_URL=pgsql://$POSTGRES_USER:$POSTGRES_PASSWORD@database/$POSTGRES_DB
-
export
-
cp ./core/.env.example ./core/.env
...
...
@@ -365,8 +367,8 @@ stages:
-
echo "DRUPAL_TEST_WEBDRIVER_PORT='9515'" >> ./core/.env
-
echo "DRUPAL_NIGHTWATCH_OUTPUT='"nightwatch_output"'" >> ./core/.env
-
cat ./core/.env
-
mkdir -p ./sites/simpletest /var/www/.cache/yarn /var/www/.yarn ./nightwatch_output
-
chown -R www-data:www-data ./sites/simpletest /var/www/.cache/yarn /var/www/.yarn ./nightwatch_output ./core/.env
-
mkdir -p ./sites/simpletest
./sites/default/files
/var/www/.cache/yarn /var/www/.yarn ./nightwatch_output
-
chown -R www-data:www-data ./sites/simpletest
./sites/default/files
/var/www/.cache/yarn /var/www/.yarn ./nightwatch_output ./core/.env
-
sudo BABEL_DISABLE_CACHE=1 -u www-data yarn --cwd ./core test:nightwatch
artifacts
:
when
:
always
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment