From e36e6bbb96b77b4e63d9bf0247828af8824a6880 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 1 Jul 2026 13:22:30 +0530 Subject: [PATCH] ci(postgres): warm up test data before baking the datadir MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mirror frappe/erpnext#56655 for the Postgres CI. Run the bootstrap_test_data module in the setup job while Postgres is still up, so the BootStrapTestData records are baked into the PGDATA artifact every shard hydrates from — the shards start on already-warmed data instead of each building it. Unlike the MariaDB step, no `su -m` wrapper: the Postgres CI is GitHub-hosted ubuntu-latest running as the runner user directly, matching its own "Run Tests" step. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/server-tests-postgres.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/server-tests-postgres.yml b/.github/workflows/server-tests-postgres.yml index 98141162d09..88b02efe72f 100644 --- a/.github/workflows/server-tests-postgres.yml +++ b/.github/workflows/server-tests-postgres.yml @@ -105,6 +105,11 @@ jobs: FRAPPE_BRANCH: develop BENCH_CACHE_DIR: /home/runner/bench-cache + - name: Warm up test data + run: | + cd ~/frappe-bench/ + bench --site test_site run-tests --lightmode --module erpnext.tests.bootstrap_test_data + - name: Stop DB and stage datadir run: | PG_BIN=$(ls -d /usr/lib/postgresql/*/bin | sort -V | tail -1)