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()