return codecov artifact from modal image

This commit is contained in:
Dan Saunders
2025-06-17 13:33:02 -04:00
parent 753e4e3dec
commit 639ddeff6a
3 changed files with 807 additions and 2 deletions

View File

@@ -77,7 +77,18 @@ def run_cmd(cmd: str, run_folder: str):
def cicd_pytest():
run_cmd("./cicd/multigpu.sh", "/workspace/axolotl")
# Read the coverage file if it exists
coverage_file = pathlib.Path("/workspace/axolotl/multigpu-coverage.xml")
if coverage_file.exists():
return coverage_file.read_text(encoding="utf-8")
return None
@app.local_entrypoint()
def main():
cicd_pytest.remote()
coverage = cicd_pytest.remote()
# Save the coverage file to the local filesystem if it was generated
if coverage:
with open("multigpu-coverage.xml", "w", encoding="utf-8") as file:
file.write(coverage)