Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Drupal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitLab CI/CD
Drupal
Commits
4b46be35
Commit
4b46be35
authored
2 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
#45
Change test log strategy
parent
8bfb6cfa
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test-and-deploy.yml
+4
-0
4 additions, 0 deletions
test-and-deploy.yml
tests/lakedrops.yml
+7
-16
7 additions, 16 deletions
tests/lakedrops.yml
with
11 additions
and
16 deletions
test-and-deploy.yml
+
4
−
0
View file @
4b46be35
...
...
@@ -320,6 +320,10 @@ Debug:
-
mkdir -p files/default/files/languages
-
mkdir -p files/default/files/translations
-
chmod -R ugo+w files/default/files/
# Prepare log directory for tests.
-
dc exec -u root php mkdir -p /tmp/testlogs
-
dc exec -u root php rm -rf /tmp/testlogs/*
-
dc exec -u root php chmod oug+w /tmp/testlogs
artifacts
:
name
:
build
when
:
always
...
...
This diff is collapsed.
Click to expand it.
tests/lakedrops.yml
+
7
−
16
View file @
4b46be35
...
...
@@ -5,6 +5,8 @@
image
:
registry.lakedrops.com/docker/gitlab-drupal-ci/php-${PHP_MAJOR_VERSION}.${PHP_MINOR_VERSION}
variables
:
GIT_STRATEGY
:
none
after_script
:
-
dc cp php:/tmp/testlogs/* .
needs
:
[
'
Build
Site'
]
dependencies
:
-
'
Build
Site'
...
...
@@ -16,6 +18,7 @@
-
DIR=$(dc exec -u root php pwd)
-
if [[ "${THEME_BUILD}" == "yes" && -d ${THEME_CSS_PATH} ]]; then dc cp ${THEME_CSS_PATH} php:${DIR}/${THEME_CSS_PATH}; fi
after_script
:
-
dc cp php:/tmp/testlogs/* .
-
if [[ "${THEME_BUILD}" == "yes" && -d ${THEME_CSS_PATH} ]]; then dc exec -u root php rm -rf ${THEME_CSS_PATH}; fi
dependencies
:
-
'
Build
Site'
...
...
@@ -24,10 +27,7 @@
Test Code Style
:
<<
:
*test_lakedrops_default
script
:
-
if [[ -f phpcs.xml ]]; then rm phpcs.xml; fi
-
ahoy test phpcs -- --report=xml --report-file=/tmp/phpcs.xml
after_script
:
-
docker cp ${COMPOSE_PROJECT_NAME}-php-1:/tmp/phpcs.xml phpcs.xml
-
ahoy test phpcs -- --report=xml --report-file=/tmp/testlogs/phpcs.xml
artifacts
:
name
:
phpcs
when
:
always
...
...
@@ -39,12 +39,7 @@ Test Code Style:
Test PHPUnit
:
<<
:
*test_lakedrops_default
script
:
-
if [[ -f junit.xml ]]; then rm junit.xml; fi
-
if [[ -f testdox.html ]]; then rm testdox.html; fi
-
ahoy test phpunit -- --log-junit /tmp/junit.xml --testdox-html /tmp/testdox.html
after_script
:
-
docker cp ${COMPOSE_PROJECT_NAME}-php-1:/tmp/junit.xml junit.xml
-
docker cp ${COMPOSE_PROJECT_NAME}-php-1:/tmp/testdox.html testdox.html
-
ahoy test phpunit -- --log-junit /tmp/testlogs/junit.xml --testdox-html /tmp/testlogs/testdox.html
artifacts
:
name
:
phpunit
when
:
always
...
...
@@ -73,16 +68,12 @@ Test Behat:
-
job
:
Update DB
optional
:
true
script
:
-
if [[ -d tests/behat/log ]]; then rm -rf tests/behat/log; fi
-
mkdir -p tests/behat/log
-
chmod oug+w tests/behat/log
-
ahoy behat update
-
ahoy behat exec -- --format junit --out tests/behat/log
-
ahoy behat exec -- --format junit --out /tmp/testlogs/default.xml
artifacts
:
name
:
behat
when
:
always
paths
:
-
tests/behat/log
-
default.xml
rules
:
-
if
:
'
$DISABLE_CI_TEST_BEHAT
!=
"1"'
...
...
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