Skip to content

Commit

Permalink
fix(ci): Fix cli and CI (#7166)
Browse files Browse the repository at this point in the history
- Add a special case for cli to handle autogpt and forge agent
- Remove forge agent from smoke test ci
  • Loading branch information
kcze committed May 22, 2024
1 parent 5292736 commit cdae98d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/autogpts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
agent-name: [ autogpt, forge ]
agent-name: [ autogpt ]
fail-fast: false
timeout-minutes: 20
env:
Expand Down
12 changes: 10 additions & 2 deletions cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ def start(agent_name: str, no_setup: bool):
import subprocess

script_dir = os.path.dirname(os.path.realpath(__file__))
agent_dir = os.path.join(script_dir, f"agents/{agent_name}")
agent_dir = os.path.join(
script_dir,
f"agents/{agent_name}" if agent_name not in ["autogpt", "forge"] else agent_name,
)
run_command = os.path.join(agent_dir, "run")
run_bench_command = os.path.join(agent_dir, "run_benchmark")
if (
Expand Down Expand Up @@ -209,6 +212,8 @@ def list():
for d in os.listdir(agents_dir)
if os.path.isdir(os.path.join(agents_dir, d))
]
if os.path.isdir("./autogpt"):
agents_list.append("autogpt")
if agents_list:
click.echo(click.style("Available agents: 🤖", fg="green"))
for agent in agents_list:
Expand Down Expand Up @@ -240,7 +245,10 @@ def start(agent_name, subprocess_args):
import subprocess

script_dir = os.path.dirname(os.path.realpath(__file__))
agent_dir = os.path.join(script_dir, f"agents/{agent_name}")
agent_dir = os.path.join(
script_dir,
f"agents/{agent_name}" if agent_name not in ["autogpt", "forge"] else agent_name,
)
benchmark_script = os.path.join(agent_dir, "run_benchmark")
if os.path.exists(agent_dir) and os.path.isfile(benchmark_script):
os.chdir(agent_dir)
Expand Down

0 comments on commit cdae98d

Please sign in to comment.