Skip to content

Commit e946c5f

Browse files
committed
Try to get coveralls working again
1 parent d0f697e commit e946c5f

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ test-groups = ["dev"]
7878
test-command = [
7979
"python -c 'import mwparserfromhell.parser._tokenizer'",
8080
"pytest {project}/tests -rxs --cov=mwparserfromhell",
81-
"if [[ $RUNNER_OS == Linux ]]; then mkdir -p /output && mv .coverage /output/.coverage.$(uuidgen); fi"
81+
"python {project}/scripts/save_coverage.py",
8282
]
8383

8484
[tool.pyright]

scripts/save_coverage.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env python
2+
3+
import os
4+
import shutil
5+
import traceback
6+
import uuid
7+
8+
try:
9+
if os.getenv("RUNNER_OS") == "Linux":
10+
os.makedirs("/output", exist_ok=True)
11+
shutil.move(".coverage", f"/output/.coverage.{uuid.uuid4().hex}")
12+
except Exception:
13+
traceback.print_exc()

0 commit comments

Comments
 (0)