From dcdbf9df17da83fc8a06dce4219be599e2bb75e1 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 30 Jun 2026 16:54:45 +0530 Subject: [PATCH] ci: warmup test data along with DB --- .github/workflows/server-tests-mariadb.yml | 7 +++++++ erpnext/tests/bootstrap_test_data.py | 3 +++ 2 files changed, 10 insertions(+) create mode 100644 erpnext/tests/bootstrap_test_data.py diff --git a/.github/workflows/server-tests-mariadb.yml b/.github/workflows/server-tests-mariadb.yml index 5c417fb9137..3e1d076ce38 100644 --- a/.github/workflows/server-tests-mariadb.yml +++ b/.github/workflows/server-tests-mariadb.yml @@ -107,6 +107,13 @@ jobs: SKIP_SYSTEM_SETUP: "1" SKIP_WKHTMLTOX_SETUP: "1" + - name: Warm up test data + run: | + su -m "${ERPNEXT_CI_USER:-frappe}" -s /bin/bash <<'EOF' + cd ~/frappe-bench/ + bench --site test_site run-tests --lightmode --module erpnext.tests.bootstrap_test_data + EOF + # Clean shutdown (consistent InnoDB datadir), then stage it inside the bench for packaging. - name: Stop DB and stage datadir run: | diff --git a/erpnext/tests/bootstrap_test_data.py b/erpnext/tests/bootstrap_test_data.py new file mode 100644 index 00000000000..713c0bdf564 --- /dev/null +++ b/erpnext/tests/bootstrap_test_data.py @@ -0,0 +1,3 @@ +# This file is solely to trigger BootStrapTestData from CI +# utils.py module import instantiates BootStrapTestData +from erpnext.tests.utils import ERPNextTestSuite