Allow change location of reports (#115)

Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
This commit is contained in:
merwanehamadi
2023-07-16 07:26:36 -07:00
committed by GitHub
parent 9f3a2d4f05
commit 2704bcee5e
2 changed files with 8 additions and 5 deletions

View File

@@ -64,7 +64,6 @@ jobs:
if: success() || failure()
tests:
if: github.event_name != 'pull_request' || matrix.cache-enabled == false
name: "${{ matrix.agent-name }} (Cache: ${{ matrix.cache-enabled }})"
runs-on: ubuntu-latest
timeout-minutes: 10
@@ -161,12 +160,12 @@ jobs:
REQUESTS_CA_BUNDLE: /etc/ssl/certs/ca-certificates.crt
HELICONE_CACHE_ENABLED: ${{ matrix.cache-enabled }}
HELICONE_PROPERTY_AGENT: ${{ matrix.agent-name }}
REPORT_LOCATION: ${{ matrix.cache-enabled == true && format('../../../benchmark_runs/{0}', matrix.agent-name) || '.' }}
- name: Upload reports
if: always()
uses: actions/upload-artifact@v3
with:
name:
"${{ matrix.agent-name }} (Cache ${{ matrix.cache-enabled }})"
path: agent/${{ matrix.agent-name }}/agbenchmark
name: ${{ matrix.agent-name }}
path: benchmark_runs/${{ matrix.agent-name }}

View File

@@ -1,5 +1,6 @@
# radio charts, logs, helper functions for tests, anything else relevant.
import glob
import os
import re
from datetime import datetime
from pathlib import Path
@@ -9,7 +10,10 @@ from agbenchmark.challenges.define_task_types import DIFFICULTY_MAP, DifficultyL
def calculate_info_test_path(benchmarks_folder_path: Path) -> str:
INFO_TESTS_PATH = benchmarks_folder_path / "reports"
INFO_TESTS_PATH = (
benchmarks_folder_path / os.getenv("REPORT_LOCATION", ".") / "reports"
)
if not INFO_TESTS_PATH.exists():
INFO_TESTS_PATH.mkdir(parents=True, exist_ok=True)