Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 913a91a

Browse files
committed
Use cwd if local
1 parent ffabb8e commit 913a91a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/conftest.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,11 @@ def redis_container(worker_id):
5757
@pytest.fixture(scope="session")
5858
def redis_cluster_container(worker_id):
5959
project_name = f"redis_test_cluster_{worker_id}"
60-
compose_file = "tests/cluster-compose.yml"
60+
# Use cwd if not running in GitHub Actions
61+
pwd = os.getcwd()
62+
compose_file = os.path.join(
63+
os.environ.get("GITHUB_WORKSPACE", pwd), "tests", "cluster-compose.yml"
64+
)
6165
os.environ["COMPOSE_PROJECT_NAME"] = (
6266
project_name # For docker compose to pick it up if needed
6367
)

0 commit comments

Comments
 (0)