mirror of
https://github.com/pyTooling/Actions.git
synced 2026-02-12 02:56:56 +08:00
Handover coverage_report_html_directory.
This commit is contained in:
9
.github/workflows/CompletePipeline.yml
vendored
9
.github/workflows/CompletePipeline.yml
vendored
@@ -141,10 +141,11 @@ jobs:
|
|||||||
jobs: ${{ needs.UnitTestingParams.outputs.python_jobs }}
|
jobs: ${{ needs.UnitTestingParams.outputs.python_jobs }}
|
||||||
requirements: "-r tests/unit/requirements.txt"
|
requirements: "-r tests/unit/requirements.txt"
|
||||||
# pacboy: "msys/git python-lxml:p"
|
# pacboy: "msys/git python-lxml:p"
|
||||||
unittest_report_xml_directory: ${{ needs.ConfigParams.outputs.unittest_report_xml_directory }}
|
unittest_report_xml_directory: ${{ needs.ConfigParams.outputs.unittest_report_xml_directory }}
|
||||||
unittest_report_xml_filename: ${{ needs.ConfigParams.outputs.unittest_report_xml_filename }}
|
unittest_report_xml_filename: ${{ needs.ConfigParams.outputs.unittest_report_xml_filename }}
|
||||||
unittest_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}
|
coverage_report_html_directory: ${{ needs.ConfigParams.outputs.coverage_report_html_directory }}
|
||||||
coverage_sqlite_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}
|
unittest_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}
|
||||||
|
coverage_sqlite_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}
|
||||||
|
|
||||||
StaticTypeCheck:
|
StaticTypeCheck:
|
||||||
uses: pyTooling/Actions/.github/workflows/StaticTypeCheck.yml@dev
|
uses: pyTooling/Actions/.github/workflows/StaticTypeCheck.yml@dev
|
||||||
|
|||||||
10
.github/workflows/ExtractConfiguration.yml
vendored
10
.github/workflows/ExtractConfiguration.yml
vendored
@@ -164,11 +164,11 @@ jobs:
|
|||||||
|
|
||||||
from tomli import load as tomli_load
|
from tomli import load as tomli_load
|
||||||
|
|
||||||
|
unittestXMLFile = Path("./unittest.xml")
|
||||||
coverageHTMLDirectory = Path("htmlcov")
|
coverageHTMLDirectory = Path("htmlcov")
|
||||||
unittestXMLFile = Path("./unittest.xml")
|
coverageXMLFile = Path("./coverage.xml")
|
||||||
coverageXMLFile = Path("./coverage.xml")
|
coverageJSONFile = Path("./coverage.json")
|
||||||
coverageJSONFile = Path("./coverage.json")
|
coverageRC = "${{ inputs.coverage_config }}".strip()
|
||||||
coverageRC = "${{ inputs.coverage_config }}".strip()
|
|
||||||
|
|
||||||
# Read output paths from 'pyproject.toml' file
|
# Read output paths from 'pyproject.toml' file
|
||||||
if coverageRC == "pyproject.toml":
|
if coverageRC == "pyproject.toml":
|
||||||
@@ -206,10 +206,10 @@ jobs:
|
|||||||
print(f"GITHUB_OUTPUT: {github_output}")
|
print(f"GITHUB_OUTPUT: {github_output}")
|
||||||
with github_output.open("a+", encoding="utf-8") as f:
|
with github_output.open("a+", encoding="utf-8") as f:
|
||||||
f.write(dedent(f"""\
|
f.write(dedent(f"""\
|
||||||
coverage_report_html_directory={coverageHTMLDirectory.as_posix()}
|
|
||||||
unittest_report_xml_directory={unittestXMLFile.parent.as_posix()}
|
unittest_report_xml_directory={unittestXMLFile.parent.as_posix()}
|
||||||
unittest_report_xml_filename={unittestXMLFile.name}
|
unittest_report_xml_filename={unittestXMLFile.name}
|
||||||
unittest_report_xml={unittestXMLFile.as_posix()}
|
unittest_report_xml={unittestXMLFile.as_posix()}
|
||||||
|
coverage_report_html_directory={coverageHTMLDirectory.as_posix()}
|
||||||
coverage_report_xml_directory={coverageXMLFile.parent.as_posix()}
|
coverage_report_xml_directory={coverageXMLFile.parent.as_posix()}
|
||||||
coverage_report_xml_filename={coverageXMLFile.name}
|
coverage_report_xml_filename={coverageXMLFile.name}
|
||||||
coverage_report_xml={coverageXMLFile.as_posix()}
|
coverage_report_xml={coverageXMLFile.as_posix()}
|
||||||
|
|||||||
9
.github/workflows/UnitTesting.yml
vendored
9
.github/workflows/UnitTesting.yml
vendored
@@ -109,6 +109,11 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
default: 'pyproject.toml'
|
default: 'pyproject.toml'
|
||||||
type: string
|
type: string
|
||||||
|
coverage_report_html_directory:
|
||||||
|
description: ''
|
||||||
|
required: false
|
||||||
|
default: 'report/coverage/html'
|
||||||
|
type: string
|
||||||
unittest_xml_artifact:
|
unittest_xml_artifact:
|
||||||
description: "Generate unit test report with junitxml and upload results as an artifact."
|
description: "Generate unit test report with junitxml and upload results as an artifact."
|
||||||
required: false
|
required: false
|
||||||
@@ -381,8 +386,8 @@ jobs:
|
|||||||
if: inputs.coverage_html_artifact != ''
|
if: inputs.coverage_html_artifact != ''
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
coverage html --data-file=.coverage -d ${{ steps.getVariables.outputs.coverage_report_html_directory }}
|
coverage html --data-file=.coverage -d ${{ inputs.coverage_report_html_directory }}
|
||||||
rm ${{ steps.getVariables.outputs.coverage_report_html_directory }}/.gitignore
|
rm ${{ inputs.coverage_report_html_directory }}/.gitignore
|
||||||
|
|
||||||
# Upload artifacts
|
# Upload artifacts
|
||||||
|
|
||||||
|
|||||||
28
.github/workflows/_Checking_JobTemplates.yml
vendored
28
.github/workflows/_Checking_JobTemplates.yml
vendored
@@ -31,11 +31,12 @@ jobs:
|
|||||||
- UnitTestingParams
|
- UnitTestingParams
|
||||||
with:
|
with:
|
||||||
jobs: ${{ needs.UnitTestingParams.outputs.python_jobs }}
|
jobs: ${{ needs.UnitTestingParams.outputs.python_jobs }}
|
||||||
unittest_report_xml_directory: ${{ needs.ConfigParams.outputs.unittest_report_xml_directory }}
|
unittest_report_xml_directory: ${{ needs.ConfigParams.outputs.unittest_report_xml_directory }}
|
||||||
unittest_report_xml_filename: ${{ needs.ConfigParams.outputs.unittest_report_xml_filename }}
|
unittest_report_xml_filename: ${{ needs.ConfigParams.outputs.unittest_report_xml_filename }}
|
||||||
unittest_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}
|
coverage_report_html_directory: ${{ needs.ConfigParams.outputs.coverage_report_html_directory }}
|
||||||
unittest_html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_html }}
|
unittest_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}
|
||||||
coverage_sqlite_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}
|
unittest_html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_html }}
|
||||||
|
coverage_sqlite_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}
|
||||||
# coverage_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_xml }}
|
# coverage_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_xml }}
|
||||||
# coverage_json_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }}
|
# coverage_json_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }}
|
||||||
# coverage_html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }}
|
# coverage_html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }}
|
||||||
@@ -49,14 +50,15 @@ jobs:
|
|||||||
jobs: ${{ needs.PlatformTestingParams.outputs.python_jobs }}
|
jobs: ${{ needs.PlatformTestingParams.outputs.python_jobs }}
|
||||||
# tests_directory: ""
|
# tests_directory: ""
|
||||||
unittest_directory: platform
|
unittest_directory: platform
|
||||||
unittest_report_xml_directory: ${{ needs.ConfigParams.outputs.unittest_report_xml_directory }}
|
unittest_report_xml_directory: ${{ needs.ConfigParams.outputs.unittest_report_xml_directory }}
|
||||||
unittest_report_xml_filename: ${{ needs.ConfigParams.outputs.unittest_report_xml_filename }}
|
unittest_report_xml_filename: ${{ needs.ConfigParams.outputs.unittest_report_xml_filename }}
|
||||||
unittest_xml_artifact: ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).unittesting_xml }}
|
coverage_report_html_directory: ${{ needs.ConfigParams.outputs.coverage_report_html_directory }}
|
||||||
unittest_html_artifact: ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).unittesting_html }}
|
unittest_xml_artifact: ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).unittesting_xml }}
|
||||||
coverage_sqlite_artifact: ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).codecoverage_sqlite }}
|
unittest_html_artifact: ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).unittesting_html }}
|
||||||
coverage_xml_artifact: ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).codecoverage_xml }}
|
coverage_sqlite_artifact: ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).codecoverage_sqlite }}
|
||||||
coverage_json_artifact: ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).codecoverage_json }}
|
coverage_xml_artifact: ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).codecoverage_xml }}
|
||||||
coverage_html_artifact: ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).codecoverage_html }}
|
coverage_json_artifact: ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).codecoverage_json }}
|
||||||
|
coverage_html_artifact: ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).codecoverage_html }}
|
||||||
|
|
||||||
StaticTypeCheck:
|
StaticTypeCheck:
|
||||||
uses: pyTooling/Actions/.github/workflows/StaticTypeCheck.yml@dev
|
uses: pyTooling/Actions/.github/workflows/StaticTypeCheck.yml@dev
|
||||||
|
|||||||
Reference in New Issue
Block a user