Changed JSON artifact from status.json to full coverage report as JSON.

This commit is contained in:
Patrick Lehmann
2024-01-12 09:37:31 +01:00
parent 19b2b7c6b6
commit a4a54df1da

View File

@@ -54,8 +54,8 @@ on:
required: false required: false
default: '' default: ''
type: string type: string
coverage_html_artifact: coverage_json_artifact:
description: 'Name of the HTML coverage artifact.' description: 'Name of the JSON coverage artifact.'
required: false required: false
default: '' default: ''
type: string type: string
@@ -132,18 +132,20 @@ jobs:
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={htmlDirectory.as_posix()} coverage_report_html_directory={htmlDirectory.as_posix()}
coverage_report_xml={xmlFile} coverage_report_xml_directory={xmlFile.parent.as_posix()}
coverage_report_json={jsonFile} coverage_report_xml={xmlFile.as_posix()}
coverage_report_json_directory={jsonFile.parent.as_posix()}
coverage_report_json={jsonFile.as_posix()}
""")) """))
print(f"DEBUG:\n html={htmlDirectory}\n xml={xmlFile}\n json={jsonFile}") print(f"DEBUG:\n html={htmlDirectory}\n xml={xmlFile}\n json={jsonFile}")
- name: 📥 Download artifacts '${{ inputs.artifact }}' from 'Package' job - name: 📥 Download artifacts '${{ inputs.coverage_json_artifact }}' from 'PublishCoverageResults' job
if: inputs.coverage_html_artifact != '' if: inputs.coverage_json_artifact != ''
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
name: ${{ inputs.coverage_html_artifact }} name: ${{ inputs.coverage_json_artifact }}
path: ${{ steps.getVariables.outputs.coverage_report_html_directory }} path: ${{ steps.getVariables.outputs.coverage_report_json_directory }}
- name: ☑ Generate HTML documentation - name: ☑ Generate HTML documentation
if: inputs.html_artifact != '' if: inputs.html_artifact != ''