diff --git a/.github/workflows/CompletePipeline.yml b/.github/workflows/CompletePipeline.yml index 315b913..0355118 100644 --- a/.github/workflows/CompletePipeline.yml +++ b/.github/workflows/CompletePipeline.yml @@ -93,6 +93,21 @@ on: required: false default: '' type: string + codecov: + description: 'Publish merged coverage and unittest reports to Codecov.' + required: false + default: false + type: boolean + codacy: + description: 'Publish merged coverage report to Codacy.' + required: false + default: false + type: boolean + dorny: + description: 'Publish merged unittest report via Dorny Test-Reporter.' + required: false + default: false + type: boolean cleanup: description: 'Cleanup artifacts afterwards.' required: false @@ -214,6 +229,8 @@ jobs: coverage_report_json_filename: ${{ needs.ConfigParams.outputs.coverage_report_json_filename }} coverage_html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }} coverage_report_html_directory: ${{ needs.ConfigParams.outputs.coverage_report_html_directory }} + codecov: ${{ inputs.codecov }} + codacy: ${{ inputs.codacy }} secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} CODACY_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} @@ -225,11 +242,15 @@ jobs: - UnitTestingParams - UnitTesting with: - additional_merge_args: '-d "--pytest=rewrite-dunder-init;reduce-depth:pytest.tests.unit"' - merged_junit_filename: ${{ needs.ConfigParams.outputs.unittest_merged_report_xml_filename }} - merged_junit_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }} + additional_merge_args: '-d "--pytest=rewrite-dunder-init;reduce-depth:pytest.tests.unit"' + testsuite-summary-name: ${{ inputs.package_name }} + merged_junit_filename: ${{ needs.ConfigParams.outputs.unittest_merged_report_xml_filename }} + merged_junit_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }} + dorny: ${{ inputs.dorny }} + codecov: ${{ inputs.codecov }} + secrets: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} # VerifyDocs: # uses: pyTooling/Actions/.github/workflows/VerifyDocs.yml@dev diff --git a/.github/workflows/PublishCoverageResults.yml b/.github/workflows/PublishCoverageResults.yml index 0ce487c..bafa84a 100644 --- a/.github/workflows/PublishCoverageResults.yml +++ b/.github/workflows/PublishCoverageResults.yml @@ -86,12 +86,12 @@ on: codecov: description: 'Publish merged coverage report to Codecov.' required: false - default: true + default: false type: boolean codacy: description: 'Publish merged coverage report to Codacy.' required: false - default: true + default: false type: boolean secrets: CODECOV_TOKEN: diff --git a/.github/workflows/PublishTestResults.yml b/.github/workflows/PublishTestResults.yml index a01f7bd..de1a450 100644 --- a/.github/workflows/PublishTestResults.yml +++ b/.github/workflows/PublishTestResults.yml @@ -49,6 +49,11 @@ on: required: false default: '"--pytest=rewrite-dunder-init;reduce-depth:pytest.tests.unit"' type: string + testsuite-summary-name: + description: 'Set TestsuiteSummary name.' + required: false + default: '' + type: string publish: description: 'Publish test report summary via Dorny Test-Reporter' required: false @@ -59,6 +64,11 @@ on: required: false default: 'Unit Test Results' type: string + dorny: + description: 'Publish merged unittest results via Dorny Test-Reporter.' + required: false + default: true + type: boolean codecov: description: 'Publish merged unittest results to Codecov.' required: false @@ -83,7 +93,7 @@ jobs: uses: pyTooling/download-artifact@v4 with: pattern: ${{ inputs.unittest_artifacts_pattern }} - path: artifacts + path: artifacts - name: 🔎 Inspect extracted artifact (tarball) run: | @@ -101,13 +111,13 @@ jobs: - name: 🔁 Merge JUnit Unit Test Summaries run: | - pyedaa-reports -v unittest "--merge=pyTest-JUnit:junit/*.xml" ${{ inputs.additional_merge_args }} "--output=pyTest-JUnit:${{ inputs.merged_junit_filename }}" + pyedaa-reports -v unittest "--name=${{ inputs.testsuite-summary-name }}" "--merge=pyTest-JUnit:junit/*.xml" ${{ inputs.additional_merge_args }} "--output=pyTest-JUnit:${{ inputs.merged_junit_filename }}" printf "%s\n" "cat ${{ inputs.merged_junit_filename }}" cat ${{ inputs.merged_junit_filename }} - name: 📊 Publish Unit Test Results uses: dorny/test-reporter@v2 - if: inputs.publish && inputs.report_title != '' + if: (inputs.dorny || inputs.publish) && inputs.report_title != '' with: name: ${{ inputs.report_title }} path: ${{ inputs.merged_junit_filename }} diff --git a/.github/workflows/_Checking_JobTemplates.yml b/.github/workflows/_Checking_JobTemplates.yml index 0a24518..8995492 100644 --- a/.github/workflows/_Checking_JobTemplates.yml +++ b/.github/workflows/_Checking_JobTemplates.yml @@ -30,7 +30,7 @@ jobs: - ConfigParams - UnitTestingParams 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_filename: ${{ needs.ConfigParams.outputs.unittest_report_xml_filename }} coverage_report_html_directory: ${{ needs.ConfigParams.outputs.coverage_report_html_directory }} @@ -47,9 +47,9 @@ jobs: - ConfigParams - PlatformTestingParams with: - jobs: ${{ needs.PlatformTestingParams.outputs.python_jobs }} + jobs: ${{ needs.PlatformTestingParams.outputs.python_jobs }} # tests_directory: "" - unittest_directory: platform + unittest_directory: platform unittest_report_xml_directory: ${{ needs.ConfigParams.outputs.unittest_report_xml_directory }} unittest_report_xml_filename: ${{ needs.ConfigParams.outputs.unittest_report_xml_filename }} coverage_report_html_directory: ${{ needs.ConfigParams.outputs.coverage_report_html_directory }} @@ -70,7 +70,7 @@ jobs: commands: | ${{ needs.ConfigParams.outputs.mypy_prepare_command }} mypy --html-report htmlmypy -p ${{ needs.ConfigParams.outputs.package_fullname }} - html_report: 'htmlmypy' + html_report: 'htmlmypy' html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }} DocCoverage: @@ -80,7 +80,7 @@ jobs: - UnitTestingParams with: python_version: ${{ needs.UnitTestingParams.outputs.python_version }} - directory: ${{ needs.ConfigParams.outputs.package_directors }} + directory : ${{ needs.ConfigParams.outputs.package_directors }} # fail_below: 70 Package: @@ -91,7 +91,7 @@ jobs: - PlatformTesting with: python_version: ${{ needs.UnitTestingParams.outputs.python_version }} - artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }} + artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }} PublishCoverageResults: uses: pyTooling/Actions/.github/workflows/PublishCoverageResults.yml@dev @@ -110,6 +110,8 @@ jobs: coverage_report_json_filename: ${{ needs.ConfigParams.outputs.coverage_report_json_filename }} coverage_html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }} coverage_report_html_directory: ${{ needs.ConfigParams.outputs.coverage_report_html_directory }} + codecov: true + codacy: true secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} CODACY_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} @@ -117,14 +119,18 @@ jobs: PublishTestResults: uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@dev needs: + - ConfigParams - UnitTestingParams - UnitTesting - PlatformTesting with: - additional_merge_args: '-d "--pytest=rewrite-dunder-init;reduce-depth:pytest.tests.unit;reduce-depth:pytest.tests.platform"' - merged_junit_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }} + additional_merge_args: '-d "--pytest=rewrite-dunder-init;reduce-depth:pytest.tests.unit;reduce-depth:pytest.tests.platform"' + testsuite-summary-name: ${{ needs.ConfigParams.outputs.package_fullname }} + merged_junit_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }} + codecov: true + dorny: true secrets: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} # VerifyDocs: # uses: pyTooling/Actions/.github/workflows/VerifyDocs.yml@dev diff --git a/.github/workflows/_Checking_NamespacePackage_Pipeline.yml b/.github/workflows/_Checking_NamespacePackage_Pipeline.yml index a8d0c00..46a19dc 100644 --- a/.github/workflows/_Checking_NamespacePackage_Pipeline.yml +++ b/.github/workflows/_Checking_NamespacePackage_Pipeline.yml @@ -10,6 +10,9 @@ jobs: with: package_namespace: pyExamples package_name: Extensions + codecov: true + codacy: true + dorny: true secrets: PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/_Checking_SimplePackage_Pipeline.yml b/.github/workflows/_Checking_SimplePackage_Pipeline.yml index db671c9..19f9573 100644 --- a/.github/workflows/_Checking_SimplePackage_Pipeline.yml +++ b/.github/workflows/_Checking_SimplePackage_Pipeline.yml @@ -9,6 +9,9 @@ jobs: uses: pyTooling/Actions/.github/workflows/CompletePipeline.yml@dev with: package_name: pyDummy + codecov: true + codacy: true + dorny: true cleanup: false secrets: PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}