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
0907d6b3
Unverified
Commit
0907d6b3
authored
3 years ago
by
Bartek Jaskulski
Browse files
Options
Downloads
Patches
Plain Diff
feature: use less integration tests
parent
6f53cf7a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
includes/tests/integration.yml
+13
-205
13 additions, 205 deletions
includes/tests/integration.yml
with
13 additions
and
205 deletions
includes/tests/integration.yml
+
13
−
205
View file @
0907d6b3
.template
:
&
job-test-template
.template
:
&
integration-test
stage
:
tests
stage
:
tests
coverage
:
'
/^\s*Lines:\s*\d+.\d+\%/'
coverage
:
'
/^\s*Lines:\s*\d+.\d+\%/'
artifacts
:
artifacts
:
reports
:
reports
:
junit
:
tmp_artifacts/report.xml
junit
:
tmp_artifacts/report.xml
interruptible
:
true
interruptible
:
true
.template
:
&job-test-integration-template
<<
:
*job-test-template
tags
:
tags
:
-
integration
-
integration
dependencies
:
dependencies
:
...
@@ -25,209 +22,20 @@
...
@@ -25,209 +22,20 @@
-
ln -s $CI_PROJECT_DIR /tmp/wordpress-develop/src/wp-content/plugins/$CI_PROJECT_NAME
-
ln -s $CI_PROJECT_DIR /tmp/wordpress-develop/src/wp-content/plugins/$CI_PROJECT_NAME
-
echo "xdebug.mode=coverage" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
-
echo "xdebug.mode=coverage" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
script
:
script
:
-
vendor/bin/phpunit -d memory_limit=-1 --configuration phpunit-integration.xml --coverage
-text --colors=never
--log-junit tmp_artifacts/report.xml
-
vendor/bin/phpunit -d memory_limit=-1 --configuration phpunit-integration.xml --
no-
coverage --log-junit tmp_artifacts/report.xml
after_script
:
after_script
:
-
'
if
[[
${REPORTPORTAL_AUTHORIZATION}
&&
${REPORTPORTAL_PROJECT}
]];
then
curl
-X
POST
"http://195.201.225.204:8080/api/v1/${REPORTPORTAL_PROJECT}/launch/import"
-H
"accept:
*/*"
-H
"Content-Type:
multipart/form-data"
-H
"${REPORTPORTAL_AUTHORIZATION}"
-F
"file=file=@tmp_artifacts/report.xml;type=text/xml;type=text/xml;filename=${CI_PROJECT_NAME}-${CI_COMMIT_REF_SLUG}-integration.xml";
fi'
-
'
if
[[
${REPORTPORTAL_AUTHORIZATION}
&&
${REPORTPORTAL_PROJECT}
]];
then
curl
-X
POST
"http://195.201.225.204:8080/api/v1/${REPORTPORTAL_PROJECT}/launch/import"
-H
"accept:
*/*"
-H
"Content-Type:
multipart/form-data"
-H
"${REPORTPORTAL_AUTHORIZATION}"
-F
"file=file=@tmp_artifacts/report.xml;type=text/xml;type=text/xml;filename=${CI_PROJECT_NAME}-${CI_COMMIT_REF_SLUG}-integration.xml";
fi'
only
:
rules
:
refs
:
-
if
:
'
$CI_COMMIT_BRANCH
==
$CI_DEFAULT_BRANCH'
-
master
-
if
:
'
$CI_COMMIT_BRANCH
==
"devel"'
-
main
-
if
:
'
$CI_COMMIT_TAG'
except
:
-
if
:
'
$DISABLE_INTEGRATION_TESTS'
variables
:
when
:
never
-
$DISABLE_COVERAGE
integration:lastest
:
.template
:
&job-test-integration-template-fast
<<
:
*integration-test
<<
:
*job-test-integration-template
script
:
-
vendor/bin/phpunit -d memory_limit=-1 --configuration phpunit-integration.xml --no-coverage --log-junit tmp_artifacts/report.xml
except
:
-
tags
only
:
.template
:
&integration_test_lastest
<<
:
*job-test-integration-template-fast
image
:
wpdesknet/phpunit-woocommerce:0-0
except
:
variables
:
-
$DISABLE_INTEGRATION_TESTS
.template
:
&integration_test_lastest_coverage
<<
:
*job-test-integration-template
image
:
wpdesknet/phpunit-woocommerce:0-0
image
:
wpdesknet/phpunit-woocommerce:0-0
except
:
variables
:
-
$DISABLE_INTEGRATION_TESTS
-
$DISABLE_COVERAGE
.template
:
&integration_test_php7-1_wc-1
integration:earliest
:
<<
:
*job-test-integration-template-fast
<<
:
*integration-test
image
:
wpdesknet/phpunit-woocommerce:1-1
except
:
variables
:
-
$DISABLE_INTEGRATION_TESTS
.template
:
&integration_test_php7_wc-2
<<
:
*job-test-integration-template-fast
image
:
wpdesknet/phpunit-woocommerce:2-2
except
:
variables
:
-
$DISABLE_INTEGRATION_TESTS
.template
:
&integration_test_php-7_wc-3
<<
:
*job-test-integration-template-fast
image
:
wpdesknet/phpunit-woocommerce:2-3
image
:
wpdesknet/phpunit-woocommerce:2-3
except
:
variables
:
-
$DISABLE_INTEGRATION_TESTS
.template
:
&integration_test_current_woocommerce
<<
:
*job-test-integration-template-fast
image
:
wpdesknet/phpunit-woocommerce:0-0
allow_failure
:
true
before_script
:
-
export DEPENDENT_PLUGINS_DIR=${CI_PROJECT_DIR}/tests/dependent_plugins
-
cd ${CI_PROJECT_DIR}
-
mkdir -p .tmp
-
cd .tmp
-
if [[ ! -d woocommerce ]]; then git clone https://github.com/woocommerce/woocommerce.git; fi
-
cd woocommerce
-
git pull
-
COMPOSER_MEMORY_LIMIT=-1 composer install --no-progress --prefer-dist
-
ln -s ${CI_PROJECT_DIR}/.tmp/woocommerce /tmp/woocommerce
-
cat /tmp/wordpress-develop/src/wp-includes/version.php
-
cat /tmp/woocommerce/woocommerce.php
-
cd ${CI_PROJECT_DIR}
-
ln -s $CI_PROJECT_DIR /tmp/wordpress-develop/src/wp-content/plugins/$CI_PROJECT_NAME
except
:
variables
:
-
$DISABLE_INTEGRATION_TESTS
integration test lastest
:
<<
:
*integration_test_lastest
only
:
refs
:
-
master
-
main
-
devel
-
tags
integration test lastest coverage
:
<<
:
*integration_test_lastest_coverage
only
:
refs
:
-
master
-
main
integration test php7-1 wc-1
:
<<
:
*integration_test_php7-1_wc-1
only
:
refs
:
-
master
-
main
-
devel
-
tags
integration test php7 wc-2
:
<<
:
*integration_test_php7_wc-2
only
:
refs
:
-
master
-
main
-
devel
-
tags
integration test php-7 wc-3
:
<<
:
*integration_test_php-7_wc-3
only
:
refs
:
-
master
-
main
-
devel
-
tags
integration test current woocommerce
:
<<
:
*integration_test_current_woocommerce
only
:
refs
:
-
master
-
main
-
devel
-
tags
integration test lastest manual
:
<<
:
*integration_test_lastest
when
:
manual
allow_failure
:
true
except
:
refs
:
-
master
-
main
-
devel
-
tags
variables
:
-
$DISABLE_INTEGRATION_TESTS
integration test lastest coverage manual
:
<<
:
*integration_test_lastest_coverage
when
:
manual
allow_failure
:
true
except
:
refs
:
-
master
-
main
-
devel
-
tags
variables
:
-
$DISABLE_INTEGRATION_TESTS
integration test php7-1 wc-1 manual
:
<<
:
*integration_test_php7-1_wc-1
when
:
manual
allow_failure
:
true
except
:
refs
:
-
master
-
main
-
devel
-
tags
variables
:
-
$DISABLE_INTEGRATION_TESTS
integration test php7 wc-2 manual
:
<<
:
*integration_test_php7_wc-2
when
:
manual
allow_failure
:
true
except
:
refs
:
-
master
-
main
-
devel
-
tags
variables
:
-
$DISABLE_INTEGRATION_TESTS
integration test php-7 wc-3 manual
:
<<
:
*integration_test_php-7_wc-3
when
:
manual
allow_failure
:
true
except
:
refs
:
-
master
-
main
-
devel
-
tags
variables
:
-
$DISABLE_INTEGRATION_TESTS
integration test current woocommerce manual
:
<<
:
*integration_test_current_woocommerce
when
:
manual
allow_failure
:
true
except
:
refs
:
-
master
-
main
-
devel
-
tags
variables
:
-
$DISABLE_INTEGRATION_TESTS
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