From b140bb3f43d416cce6f60a861426108d46f2d7bb Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Sat, 18 Sep 2021 16:01:20 +0530 Subject: [PATCH] test: run patch test to last release and PR In the patch test, instead of migrating to the current SHA directly. Migrate to the latest release (with code at the time of release) and then migrate to last commit in PR. Why? When directly migrating, the previous patches that would've run with old code have access to the new code and it's not realistic. This change brings it a little bit closer to reality. Hence missing failures that would occur with IRL installations. --- .github/workflows/patch-mariadb-tests.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/patch-mariadb-tests.yml b/.github/workflows/patch-mariadb-tests.yml index 3ac5cfa349..926b774782 100644 --- a/.github/workflows/patch-mariadb-tests.yml +++ b/.github/workflows/patch-mariadb-tests.yml @@ -102,4 +102,13 @@ jobs: cd ~/frappe-bench/ wget https://frappeframework.com/files/v10-frappe.sql.gz bench --site test_site --force restore ~/frappe-bench/v10-frappe.sql.gz + cd apps/frappe && git remote set-url upstream https://github.com/frappe/frappe.git && git fetch --all --tags + git tag --sort version:refname \ + | grep -v "beta" \ + | tail -1 \ + | xargs -L 1 git checkout -f + bench setup requirements --python + bench --site test_site migrate --skip-search-index + git checkout -f "$GITHUB_SHA" + bench setup requirements --python bench --site test_site migrate