Skip to content
Snippets Groups Projects
Verified Commit ce5884b4 authored by Bartek Jaskulski's avatar Bartek Jaskulski
Browse files

feat: import and export db dump before test run

parent 3b36836c
No related branches found
No related tags found
No related merge requests found
......@@ -84,9 +84,16 @@
- chmod -R a+w ${APACHE_DOCUMENT_ROOT}/wp-content/uploads
- touch ${APACHE_DOCUMENT_ROOT}/wp-content/debug.log
- chmod a+w ${APACHE_DOCUMENT_ROOT}/wp-content/debug.log
- |
if [ -f ${CI_PROJECT_DIR}/tests/codeception/tests/_data/db.sql ]; then
# Always ensure the database is up to date
- wp --path="$APACHE_DOCUMENT_ROOT" core update-db
- wp --path="$APACHE_DOCUMENT_ROOT" wc update || true
set -x
wp db import ${CI_PROJECT_DIR}/tests/codeception/tests/_data/db.sql
wp --path="$APACHE_DOCUMENT_ROOT" core update-db
wp --path="$APACHE_DOCUMENT_ROOT" wc update || true
wp db export ${CI_PROJECT_DIR}/tests/codeception/tests/_data/db.sql
set +x
fi
- echo "End before"
- cd ${CI_PROJECT_DIR}
script:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment