From 269156ff7d80e149adcc8fbfdbc68f1ed4e15c5b Mon Sep 17 00:00:00 2001 From: Lev Date: Thu, 24 Mar 2022 11:30:19 +0300 Subject: [PATCH] Fix develop build (#731) * Prevent tests from modifying $GITHUB_ENV This fixes develop build. * Update frappe git url in dev requirements * Update --- requirements-dev.txt | 2 +- tests/conftest.py | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index cfe59add..971a8e38 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,3 +1,3 @@ -frappe @ git+git://github.com/frappe/frappe.git +frappe @ git+https://github.com/frappe/frappe.git boto3-stubs[s3] black==22.1.0 diff --git a/tests/conftest.py b/tests/conftest.py index 70ad2a02..030e79f9 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -10,13 +10,12 @@ from tests.utils import CI, Compose def _add_version_var(name: str, env_path: Path): - if not os.getenv(name): + value = os.getenv(name) + + if not value: return - if (gh_env := os.getenv("GITHUB_ENV")) and os.environ[name] == "develop": - with open(gh_env, "a") as f: - f.write(f"\n{name}=latest") - + if value == "develop": os.environ[name] = "latest" with open(env_path, "a") as f: @@ -32,7 +31,7 @@ def env_file(tmp_path_factory: pytest.TempPathFactory): for var in ("FRAPPE_VERSION", "ERPNEXT_VERSION"): _add_version_var(name=var, env_path=file_path) - yield file_path + yield str(file_path) os.remove(file_path)