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: |
|
run: |
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from tomli import load as tomli_load
|
from tomli import load as tomli_load
|
||||||
|
|
||||||
coverageRC = "${{ inputs.coverage_config }}".strip()
|
coverageRC = "${{ inputs.coverage_config }}".strip()
|
||||||
|
|
||||||
# Read output paths from 'pyproject.toml' file
|
# Read output paths from 'pyproject.toml' file
|
||||||
@@ -90,24 +90,24 @@ jobs:
|
|||||||
if pyProjectFile.exists():
|
if pyProjectFile.exists():
|
||||||
with pyProjectFile.open("rb") as file:
|
with pyProjectFile.open("rb") as file:
|
||||||
pyProjectSettings = tomli_load(file)
|
pyProjectSettings = tomli_load(file)
|
||||||
|
|
||||||
htmlDirectory = pyProjectSettings["tool"]["coverage"]["html"]["directory"]
|
htmlDirectory = pyProjectSettings["tool"]["coverage"]["html"]["directory"]
|
||||||
xmlFile = pyProjectSettings["tool"]["coverage"]["xml"]["output"]
|
xmlFile = pyProjectSettings["tool"]["coverage"]["xml"]["output"]
|
||||||
else:
|
else:
|
||||||
print(f"File '{pyProjectFile}' not found and no ' .coveragerc' file specified.")
|
print(f"File '{pyProjectFile}' not found and no ' .coveragerc' file specified.")
|
||||||
|
|
||||||
# Read output paths from '.coveragerc' file
|
# Read output paths from '.coveragerc' file
|
||||||
else:
|
else:
|
||||||
coverageRCFile = Path(coverageRC)
|
coverageRCFile = Path(coverageRC)
|
||||||
if coverageRCFile.exists():
|
if coverageRCFile.exists():
|
||||||
with coverageRCFile.open("rb") as file:
|
with coverageRCFile.open("rb") as file:
|
||||||
coverageRCSettings = tomli_load(file)
|
coverageRCSettings = tomli_load(file)
|
||||||
|
|
||||||
htmlDirectory = pyProjectSettings["html"]["directory"]
|
htmlDirectory = coverageRCSettings["html"]["directory"]
|
||||||
xmlFile = pyProjectSettings["xml"]["output"]
|
xmlFile = coverageRCSettings["xml"]["output"]
|
||||||
else:
|
else:
|
||||||
print(f"File '{coverageRCFile}' not found.")
|
print(f"File '{coverageRCFile}' not found.")
|
||||||
|
|
||||||
print(f"::set-output name=coverage_report_html_directory::{htmlDirectory}")
|
print(f"::set-output name=coverage_report_html_directory::{htmlDirectory}")
|
||||||
print(f"::set-output name=coverage_report_xml::{xmlFile}")
|
print(f"::set-output name=coverage_report_xml::{xmlFile}")
|
||||||
print(f"DEBUG:\n html={htmlDirectory}\n xml={xmlFile}")
|
print(f"DEBUG:\n html={htmlDirectory}\n xml={xmlFile}")
|
||||||
|
|||||||
Reference in New Issue
Block a user