mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 09:14:59 +00:00
Add simple sanity check for docker
This commit is contained in:
parent
06656998e1
commit
03a5598c60
1 changed files with 16 additions and 0 deletions
|
@ -86,6 +86,8 @@ def main(
|
||||||
summarize_results(dirname)
|
summarize_results(dirname)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
check_docker()
|
||||||
|
|
||||||
if clean and dirname.exists():
|
if clean and dirname.exists():
|
||||||
print("Cleaning up and replacing", dirname)
|
print("Cleaning up and replacing", dirname)
|
||||||
dir_files = set(fn.name for fn in dirname.glob("*"))
|
dir_files = set(fn.name for fn in dirname.glob("*"))
|
||||||
|
@ -432,5 +434,19 @@ def cleanup_test_output(output):
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
||||||
|
def check_docker():
|
||||||
|
command = [
|
||||||
|
"docker",
|
||||||
|
"run",
|
||||||
|
"-it",
|
||||||
|
"--rm",
|
||||||
|
"--interactive=false",
|
||||||
|
"python:3.8-slim",
|
||||||
|
"/bin/true",
|
||||||
|
]
|
||||||
|
result = subprocess.run(command, stdout=subprocess.PIPE, text=True)
|
||||||
|
assert not result.returncode, "Can't run: " + " ".join(command)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
app()
|
app()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue