mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-25 01:44:28 +01:00
forcing AGENT_NAME to be defined from repo
This commit is contained in:
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
@@ -93,10 +93,6 @@ jobs:
|
||||
submodules: true
|
||||
token: ${{ env.GH_TOKEN }}
|
||||
|
||||
- name: List submodule files
|
||||
run: |
|
||||
ls -al agbenchmark/challenges
|
||||
|
||||
- name: Set up Python ${{ env.min-python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
@@ -112,11 +108,7 @@ jobs:
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python --version
|
||||
poetry --version
|
||||
poetry install --no-interaction -vvv
|
||||
poetry run agbenchmark start --mock
|
||||
poetry run agbenchmark start --mock --maintain
|
||||
poetry install -vvv
|
||||
poetry build
|
||||
|
||||
- name: Run regression tests
|
||||
|
||||
@@ -76,7 +76,11 @@ def start(
|
||||
)
|
||||
return 1
|
||||
|
||||
print("CONFIG_PATH", CONFIG_PATH)
|
||||
if os.path.join("Auto-GPT-Benchmarks") in str(HOME_DIRECTORY) and not AGENT_NAME:
|
||||
print(
|
||||
"If you are running from the Auto-GPT-Benchmarks repo, you must have AGENT_NAME defined."
|
||||
)
|
||||
return 1
|
||||
|
||||
if not os.path.exists(CONFIG_PATH) or os.stat(CONFIG_PATH).st_size == 0:
|
||||
config = {}
|
||||
@@ -84,6 +88,7 @@ def start(
|
||||
config["workspace"] = click.prompt(
|
||||
"Please enter a new workspace path",
|
||||
default=os.path.join("workspace"),
|
||||
show_default=True,
|
||||
)
|
||||
|
||||
with open(CONFIG_PATH, "w") as f:
|
||||
@@ -93,20 +98,20 @@ def start(
|
||||
with open(CONFIG_PATH, "r") as f:
|
||||
config = json.load(f)
|
||||
|
||||
os.environ["MOCK_TEST"] = "True" if mock else "False"
|
||||
print("Current configuration:")
|
||||
for key, value in config.items():
|
||||
print(f"{key}: {value}")
|
||||
|
||||
if not os.path.exists(REGRESSION_TESTS_PATH):
|
||||
with open(REGRESSION_TESTS_PATH, "w"):
|
||||
pass
|
||||
|
||||
os.environ["MOCK_TEST"] = "True" if mock else "False"
|
||||
|
||||
if not os.path.exists(INFO_TESTS_PATH):
|
||||
with open(INFO_TESTS_PATH, "w"):
|
||||
pass
|
||||
|
||||
print("Current configuration:")
|
||||
for key, value in config.items():
|
||||
print(f"{key}: {value}")
|
||||
|
||||
pytest_args = ["-vs"]
|
||||
if test:
|
||||
print("Running specific test:", test)
|
||||
|
||||
@@ -216,7 +216,6 @@ def calculate_dynamic_paths() -> tuple[Path, str, str, str]:
|
||||
CONFIG_PATH, REGRESSION_TESTS_PATH, INFO_TESTS_PATH = assign_paths(
|
||||
benchmarks_folder_path
|
||||
)
|
||||
|
||||
else:
|
||||
# otherwise the default is when home is an agent (running agbenchmark from agent/agent_repo)
|
||||
# used when its just a pip install
|
||||
|
||||
Reference in New Issue
Block a user