mirror of
https://github.com/pyTooling/Actions.git
synced 2026-02-12 02:56:56 +08:00
Report errors also to Pipeline message log.
This commit is contained in:
13
.github/workflows/UnitTesting.yml
vendored
13
.github/workflows/UnitTesting.yml
vendored
@@ -197,7 +197,11 @@ jobs:
|
||||
requirements = "${{ inputs.requirements }}"
|
||||
if requirements.startswith("-r"):
|
||||
requirementsFile = Path(requirements[2:].lstrip())
|
||||
dependencies = loadRequirementsFile(requirementsFile)
|
||||
try:
|
||||
dependencies = loadRequirementsFile(requirementsFile)
|
||||
except FileNotFoundError as ex:
|
||||
print(f"::error title=FileNotFoundError::{ex}")
|
||||
exit(1)
|
||||
else:
|
||||
dependencies = [req.strip() for req in requirements.split(" ")]
|
||||
|
||||
@@ -344,7 +348,9 @@ jobs:
|
||||
xmlFile = Path(pyProjectSettings["tool"]["coverage"]["xml"]["output"])
|
||||
jsonFile = Path(pyProjectSettings["tool"]["coverage"]["json"]["output"])
|
||||
else:
|
||||
print(f"File '{pyProjectFile}' not found and no '.coveragerc' file specified.")
|
||||
print(f"File '{pyProjectFile}' not found.")
|
||||
print(f"::error title=FileNotFoundError::File '{pyProjectFile}' not found.")
|
||||
exit(1)
|
||||
|
||||
# Read output paths from '.coveragerc' file
|
||||
elif len(coverageRC) > 0:
|
||||
@@ -358,6 +364,8 @@ jobs:
|
||||
jsonFile = Path(coverageRCSettings["json"]["output"])
|
||||
else:
|
||||
print(f"File '{coverageRCFile}' not found.")
|
||||
print(f"::error title=FileNotFoundError::File '{coverageRCFile}' not found.")
|
||||
exit(1)
|
||||
|
||||
# Write jobs to special file
|
||||
github_output = Path(getenv("GITHUB_OUTPUT"))
|
||||
@@ -452,6 +460,7 @@ jobs:
|
||||
with:
|
||||
name: ${{ inputs.coverage_sqlite_artifact }}-${{ matrix.system }}-${{ matrix.runtime }}-${{ matrix.python }}
|
||||
path: .coverage
|
||||
include-hidden-files: true
|
||||
if-no-files-found: error
|
||||
retention-days: 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user