Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
gitlab-ci
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wpdesk
gitlab-ci
Commits
7afe774c
Commit
7afe774c
authored
2 years ago
by
Grzegorz Rola
Browse files
Options
Downloads
Patches
Plain Diff
Feature/speedup codeception parallel
parent
80b7368e
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
gitlab-ci-1.2.yml
+1
-1
1 addition, 1 deletion
gitlab-ci-1.2.yml
includes/tests/codeception-parallel.yml
+60
-10
60 additions, 10 deletions
includes/tests/codeception-parallel.yml
with
61 additions
and
11 deletions
gitlab-ci-1.2.yml
+
1
−
1
View file @
7afe774c
variables
:
WPDESK_CI_VERSION
:
"
2023.0
2.4
"
WPDESK_CI_VERSION
:
"
2023.0
3.1
"
MYSQL_ROOT_PASSWORD
:
"
mysql"
MYSQL_DATABASE
:
"
wptest"
MYSQL_USER
:
"
mysql"
...
...
This diff is collapsed.
Click to expand it.
includes/tests/codeception-parallel.yml
+
60
−
10
View file @
7afe774c
.template
:
&job-
codeception
-test-
parallel
prepare
codeception
parallel
:
tags
:
-
codeception
-
$TESTS_TAG
image
:
name
:
wpdesknet/codeception:11
entrypoint
:
[
"
"
]
only
:
variables
:
-
$CODECEPTION_PARALLEL
needs
:
-
prepare prefixed vendor
-
prepare translations
...
...
@@ -18,27 +21,20 @@
CI_DEBUG_SERVICES
:
trace
SCREEN_WIDTH
:
1200
SCREEN_HEIGHT
:
1200
parallel
:
4
retry
:
2
services
:
-
name
:
mysql:5.6
alias
:
mysqltests
command
:
[
--max-allowed-packet=67108864
]
-
name
:
wpdesknet/wordpress:52
alias
:
wootests
-
name
:
selenium/standalone-chrome:latest
alias
:
chrome
artifacts
:
when
:
always
paths
:
-
tests/codeception/tests/_output
reports
:
junit
:
tests/codeception/tests/_output/report.xml
-
tests/codeception/tests
-
${APACHE_DOCUMENT_ROOT}
stage
:
tests
allow_failure
:
false
interruptible
:
true
before_script
:
-
export PARALLEL_JOB=${CI_NODE_INDEX}
script
:
-
echo "xdebug.max_nesting_level=2560" >> /usr/local/etc/php/php.ini
-
export DEPENDENT_PLUGINS_DIR=${CI_PROJECT_DIR}/tests/dependent_plugins
...
...
@@ -62,6 +58,60 @@
-
touch ${APACHE_DOCUMENT_ROOT}/wp-content/debug.log
-
chmod a+w ${APACHE_DOCUMENT_ROOT}/wp-content/debug.log
-
echo "End before"
.template
:
&job-codeception-test-parallel
tags
:
-
codeception
-
$TESTS_TAG
image
:
name
:
wpdesknet/codeception:11
entrypoint
:
[
"
"
]
needs
:
-
prepare prefixed vendor
-
prepare translations
-
prepare codeception parallel
-
job
:
prepare tests
optional
:
true
-
job
:
prepare npm assets
optional
:
true
variables
:
WP_CLI_CACHE_DIR
:
/cache/wp-cli
APACHE_DOCUMENT_ROOT
:
${CI_PROJECT_DIR}/tests/wordpress
CI_DEBUG_SERVICES
:
trace
SCREEN_WIDTH
:
1200
SCREEN_HEIGHT
:
1200
parallel
:
4
retry
:
2
services
:
-
name
:
mysql:5.6
alias
:
mysqltests
command
:
[
--max-allowed-packet=67108864
]
-
name
:
wpdesknet/wordpress:52
alias
:
wootests
-
name
:
selenium/standalone-chrome:latest
alias
:
chrome
artifacts
:
when
:
always
paths
:
-
tests/codeception/tests/_output
reports
:
junit
:
tests/codeception/tests/_output/report.xml
stage
:
tests
allow_failure
:
false
interruptible
:
true
before_script
:
-
export PARALLEL_JOB=${CI_NODE_INDEX}
script
:
-
echo "xdebug.max_nesting_level=2560" >> /usr/local/etc/php/php.ini
-
export DEPENDENT_PLUGINS_DIR=${CI_PROJECT_DIR}/tests/dependent_plugins
-
mkdir -p /cache/wp-cli
-
export MYSQL_IP=$(awk '/^[[:space:]]*($|#)/{next} /mysqltests/{print $1; exit}' /etc/hosts)
-
export WOOTESTS_IP=$(awk '/^[[:space:]]*($|#)/{next} /wootests/{print $1; exit}' /etc/hosts)
-
export TEST_SITE_WP_URL="http://${WOOTESTS_IP}"
-
cd ${APACHE_DOCUMENT_ROOT}
-
wp config set WP_SITEURL ${TEST_SITE_WP_URL} --allow-root
-
wp config set WP_HOME ${TEST_SITE_WP_URL} --allow-root
-
wp config set DB_HOST ${MYSQL_IP} --allow-root
-
cd ${CI_PROJECT_DIR}
-
composer prepare-parallel-codeception-tests ${CI_NODE_TOTAL}
-
vendor/bin/codecept run acceptance $PARALLEL_JOB --steps --xml --html -f --verbose
...
...
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