From 2a04a68930ad6529b63f4a6f62403f6f44e31932 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Sun, 29 Jun 2025 05:25:25 -0400 Subject: [PATCH] Try to get coveralls working again --- .github/workflows/build.yml | 1 + pyproject.toml | 2 +- scripts/save_coverage.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e8f4e57..4f92686 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,6 +45,7 @@ jobs: uses: coverallsapp/github-action@v2 with: files: ${{ steps.get-coverage-files.outputs.files }} + format: lcov build-sdist: name: Build source distribution diff --git a/pyproject.toml b/pyproject.toml index 30d29dd..f845bbb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -78,7 +78,7 @@ environment-pass = ["RUNNER_OS"] test-groups = ["dev"] test-command = [ 'python -c "import mwparserfromhell.parser._tokenizer"', - "pytest {project}/tests -rxs --cov=mwparserfromhell", + "pytest {project}/tests -rxs --cov=mwparserfromhell --cov-report=lcov:coverage.lcov", "python {project}/scripts/save_coverage.py", ] diff --git a/scripts/save_coverage.py b/scripts/save_coverage.py index 9059509..467b770 100755 --- a/scripts/save_coverage.py +++ b/scripts/save_coverage.py @@ -8,6 +8,6 @@ import uuid try: if os.getenv("RUNNER_OS") == "Linux": os.makedirs("/output", exist_ok=True) - shutil.move(".coverage", f"/output/coverage.{uuid.uuid4().hex}") + shutil.move("coverage.lcov", f"/output/coverage.{uuid.uuid4().hex}.lcov") except Exception: traceback.print_exc()