浏览代码

Try to get coveralls working again

tags/v0.7.1
Ben Kurtovic 1年前
父节点
当前提交
e946c5f175
共有 2 个文件被更改,包括 14 次插入 和 1 次删除
  1. +1
    -1
      pyproject.toml
  2. +13
    -0
      scripts/save_coverage.py

+ 1
- 1
pyproject.toml 查看文件

@@ -78,7 +78,7 @@ test-groups = ["dev"]
test-command = [
"python -c 'import mwparserfromhell.parser._tokenizer'",
"pytest {project}/tests -rxs --cov=mwparserfromhell",
"if [[ $RUNNER_OS == Linux ]]; then mkdir -p /output && mv .coverage /output/.coverage.$(uuidgen); fi"
"python {project}/scripts/save_coverage.py",
]

[tool.pyright]


+ 13
- 0
scripts/save_coverage.py 查看文件

@@ -0,0 +1,13 @@
#!/usr/bin/env python

import os
import shutil
import traceback
import uuid

try:
if os.getenv("RUNNER_OS") == "Linux":
os.makedirs("/output", exist_ok=True)
shutil.move(".coverage", f"/output/.coverage.{uuid.uuid4().hex}")
except Exception:
traceback.print_exc()

正在加载...
取消
保存