Skip to content

Commit

Permalink
ci(github-actions): fixed issue with setting up test infra
Browse files Browse the repository at this point in the history
  • Loading branch information
shinybrar committed Jun 18, 2024
1 parent b9390bd commit 95bb86a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ jobs:
-
name: Run services
run: |
docker-compose -f docker-compose.yml up -d
docker compose -f docker-compose.yml up buckets mongo results -d
sleep 10
docker compose -f docker-compose.yml up -d
sleep 10
docker compose logs
-
Expand Down
2 changes: 1 addition & 1 deletion workflow/cli/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def run(
write.workspace(payload)

if isinstance(workspace, dict):
logger.info(f"Running with workspace from {workspace}")
logger.info(f"Running with dict workspace: {workspace}")
# Save the workspace to the default location
write.workspace(workspace)

Expand Down
5 changes: 2 additions & 3 deletions workflow/utils/write.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,15 @@ def workspace(
Returns:
None: None
"""
if not destination.parent.exists():
destination.parent.mkdir(parents=True, exist_ok=True)
# If destination file exists, move it to a backup location file.
date: str = datetime.now().strftime("%Y%m%d%H%M%S")
if destination.exists():
destination.replace(destination.with_suffix(f".{date}.bak"))
# Make sure the source path exists.
if isinstance(source, Path):
assert source.exists(), f"workspace {source} does not exist."
if not destination.parent.exists():
destination.parent.mkdir(parents=True, exist_ok=True)
# Copy the source to the destination.
source.replace(destination)
return
# Write dictionary to destination.
Expand Down

0 comments on commit 95bb86a

Please sign in to comment.