Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
FORCE_REBUILD: "true"
PYTEST_MARK: ""
AUTODATA_RESULTS_DIR: test-results
AUTODATA_BENCHMARK_DIR: test-results/benchmarks

steps:
# Self-hosted runners persist the workspace; clear prior results so an early
Expand Down
9 changes: 8 additions & 1 deletion autodata_tests/utils/test_ci_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def ci_launcher(tmp_path):
TEST_DOCKER_LOG=str(log),
FORCE_REBUILD="false",
AUTODATA_RESULTS_DIR="",
AUTODATA_BENCHMARK_DIR="",
)

def run(**variables):
Expand All @@ -79,7 +80,8 @@ def run(**variables):
assert source.stat().st_uid == os.getuid()
(source / "arena-cache-write-check").write_text("writable")
command = args[args.index("env") :]
assert command[4:7] == ["python", "-m", "pytest"]
assert command[command.index("python") :][:3] == ["python", "-m", "pytest"]
assert f"AUTODATA_BENCHMARK_DIR={variables.get('AUTODATA_BENCHMARK_DIR', '')}" in command
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
return source

return run, runner_temp
Expand All @@ -96,3 +98,8 @@ def test_ci_cache_respects_explicit_mount(ci_launcher, tmp_path):
run, _ = ci_launcher
selected = tmp_path / "selected cache"
assert run(AUTODATA_DOCKER_CACHE_DIR=str(selected)) == selected


def test_benchmark_dir_is_forwarded_into_the_container(ci_launcher):
run, _ = ci_launcher
run(AUTODATA_BENCHMARK_DIR="test-results/benchmarks")
3 changes: 2 additions & 1 deletion docs/pages/advanced/testing_and_ci.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ The suite is organized in tiers of increasing cost:
- Success-rate benchmarks (hundreds of attempts per run) asserting generation quality
thresholds per task. Each also reports its run's :doc:`metrics <../references/metrics>`; with
``AUTODATA_BENCHMARK_DIR`` set, each writes its generation result, attempt log and report to a
subdirectory named after the benchmark, replacing an earlier run's. Nightly-scale.
subdirectory named after the benchmark, replacing an earlier run's. The nightly sets it to ``test-results/benchmarks``, so the artifact
``nightly-test-results`` holds them. Nightly-scale.
* - ``test_data/``
- Pre-annotated source datasets (Git LFS) used by the tests — and handy as quickstart
inputs.
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ fi
PYTEST_ARGS=(
env
"AUTODATA_SUBPROCESS_TIMEOUT=${SUBPROCESS_TIMEOUT}"
"AUTODATA_BENCHMARK_DIR=${AUTODATA_BENCHMARK_DIR-}"
"XDG_CACHE_HOME=${CONTAINER_CACHE_DIR}"
"WARP_CACHE_PATH=${CONTAINER_CACHE_DIR}/warp"
python -m pytest -sv --durations=0
Expand Down
Loading