fix: add shadow .env file for compose file (#196)

This commit is contained in:
Vineeth Voruganti 2025-09-24 16:09:51 -04:00 committed by GitHub
parent b21b74af11
commit 09a6b4f8e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 2 deletions

View File

@ -98,3 +98,9 @@ reportExplicitAny = false
allowedUntypedLibraries = ["langfuse"]
reportImplicitOverride = false
reportImportCycles = false
[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
publish-url = "https://test.pypi.org/legacy/"
explicit = true

View File

@ -552,14 +552,19 @@ except Exception as e:
# Backup .env file to prevent it from overriding our environment variables
self.backup_env_file()
# Copy .env file from tests/bench to the project root
# Copy .env file from tests/bench to the project root for FastAPI
shutil.copy(
self.project_root / "tests" / "bench" / ".env", self.project_root
self.project_root / "tests" / "bench" / ".env",
self.project_root / ".env",
)
# Create temporary docker-compose.yml
self.create_temp_docker_compose()
# Create an empty .env file in temp directory to satisfy docker-compose
# (even though the database service doesn't actually use it)
(self.temp_dir / ".env").touch()
# Start database
self.start_database()