diff --git a/.github/workflows/CoverageCollection.yml b/.github/workflows/CoverageCollection.yml index fa72e8c..37be0b2 100644 --- a/.github/workflows/CoverageCollection.yml +++ b/.github/workflows/CoverageCollection.yml @@ -81,7 +81,7 @@ jobs: run: | from pathlib import Path from tomli import load as tomli_load - + coverageRC = "${{ inputs.coverage_config }}".strip() # Read output paths from 'pyproject.toml' file @@ -90,24 +90,24 @@ jobs: if pyProjectFile.exists(): with pyProjectFile.open("rb") as file: pyProjectSettings = tomli_load(file) - + htmlDirectory = pyProjectSettings["tool"]["coverage"]["html"]["directory"] xmlFile = pyProjectSettings["tool"]["coverage"]["xml"]["output"] else: print(f"File '{pyProjectFile}' not found and no ' .coveragerc' file specified.") - + # Read output paths from '.coveragerc' file else: coverageRCFile = Path(coverageRC) if coverageRCFile.exists(): with coverageRCFile.open("rb") as file: coverageRCSettings = tomli_load(file) - - htmlDirectory = pyProjectSettings["html"]["directory"] - xmlFile = pyProjectSettings["xml"]["output"] + + htmlDirectory = coverageRCSettings["html"]["directory"] + xmlFile = coverageRCSettings["xml"]["output"] else: print(f"File '{coverageRCFile}' not found.") - + print(f"::set-output name=coverage_report_html_directory::{htmlDirectory}") print(f"::set-output name=coverage_report_xml::{xmlFile}") print(f"DEBUG:\n html={htmlDirectory}\n xml={xmlFile}")