mirror of
https://github.com/pyTooling/Actions.git
synced 2026-02-12 02:56:56 +08:00
CoverageCollection: fix variable name
This commit is contained in:
14
.github/workflows/CoverageCollection.yml
vendored
14
.github/workflows/CoverageCollection.yml
vendored
@@ -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}")
|
||||
|
||||
Reference in New Issue
Block a user