return codecov artifact from modal image
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
"""Modal app to run axolotl GPU tests"""
|
||||
|
||||
import pathlib
|
||||
|
||||
from .single_gpu import GPU_CONFIG, VOLUME_CONFIG, app, cicd_image, run_cmd
|
||||
|
||||
|
||||
@@ -12,9 +14,21 @@ from .single_gpu import GPU_CONFIG, VOLUME_CONFIG, app, cicd_image, run_cmd
|
||||
volumes=VOLUME_CONFIG,
|
||||
)
|
||||
def cicd_pytest():
|
||||
|
||||
run_cmd("./cicd/cicd.sh", "/workspace/axolotl")
|
||||
|
||||
# Read the coverage file if it exists
|
||||
coverage_file = pathlib.Path("/workspace/axolotl/e2e-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("e2e-coverage.xml", "w", encoding="utf-8") as f:
|
||||
f.write(coverage)
|
||||
|
||||
Reference in New Issue
Block a user