()
| 385 | |
| 386 | def sh(cmd): |
| 387 | print("+", " ".join(cmd)) |
| 388 | if os.environ.get("CI_AFFECTED_DRY_RUN", "").lower() in ("1", "true"): |
| 389 | return 0 |
| 390 | return subprocess.run(cmd, cwd=REPO).returncode |
| 391 | |
| 392 | |
| 393 | def run_test(): |
| 394 | mode = os.environ.get("MODE", "") |
| 395 | crates = os.environ.get("CRATES", "").split() |
| 396 | if mode == "none" or (mode == "subset" and not crates): |
| 397 | print("No affected crates; skipping tests.") |
| 398 | return 0 |
| 399 | if mode == "all": |
no test coverage detected