mirror of
https://github.com/pyTooling/Actions.git
synced 2026-02-12 11:06:56 +08:00
Allow control where to publish reports (Codecov, Codacy, Dorny Test-Reporter).
This commit is contained in:
21
.github/workflows/CompletePipeline.yml
vendored
21
.github/workflows/CompletePipeline.yml
vendored
@@ -93,6 +93,21 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
default: ''
|
default: ''
|
||||||
type: string
|
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:
|
cleanup:
|
||||||
description: 'Cleanup artifacts afterwards.'
|
description: 'Cleanup artifacts afterwards.'
|
||||||
required: false
|
required: false
|
||||||
@@ -214,6 +229,8 @@ jobs:
|
|||||||
coverage_report_json_filename: ${{ needs.ConfigParams.outputs.coverage_report_json_filename }}
|
coverage_report_json_filename: ${{ needs.ConfigParams.outputs.coverage_report_json_filename }}
|
||||||
coverage_html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }}
|
coverage_html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }}
|
||||||
coverage_report_html_directory: ${{ needs.ConfigParams.outputs.coverage_report_html_directory }}
|
coverage_report_html_directory: ${{ needs.ConfigParams.outputs.coverage_report_html_directory }}
|
||||||
|
codecov: ${{ inputs.codecov }}
|
||||||
|
codacy: ${{ inputs.codacy }}
|
||||||
secrets:
|
secrets:
|
||||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
CODACY_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
CODACY_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
||||||
@@ -226,8 +243,12 @@ jobs:
|
|||||||
- UnitTesting
|
- UnitTesting
|
||||||
with:
|
with:
|
||||||
additional_merge_args: '-d "--pytest=rewrite-dunder-init;reduce-depth:pytest.tests.unit"'
|
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_filename: ${{ needs.ConfigParams.outputs.unittest_merged_report_xml_filename }}
|
||||||
merged_junit_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}
|
merged_junit_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}
|
||||||
|
dorny: ${{ inputs.dorny }}
|
||||||
|
codecov: ${{ inputs.codecov }}
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
|
||||||
|
|||||||
4
.github/workflows/PublishCoverageResults.yml
vendored
4
.github/workflows/PublishCoverageResults.yml
vendored
@@ -86,12 +86,12 @@ on:
|
|||||||
codecov:
|
codecov:
|
||||||
description: 'Publish merged coverage report to Codecov.'
|
description: 'Publish merged coverage report to Codecov.'
|
||||||
required: false
|
required: false
|
||||||
default: true
|
default: false
|
||||||
type: boolean
|
type: boolean
|
||||||
codacy:
|
codacy:
|
||||||
description: 'Publish merged coverage report to Codacy.'
|
description: 'Publish merged coverage report to Codacy.'
|
||||||
required: false
|
required: false
|
||||||
default: true
|
default: false
|
||||||
type: boolean
|
type: boolean
|
||||||
secrets:
|
secrets:
|
||||||
CODECOV_TOKEN:
|
CODECOV_TOKEN:
|
||||||
|
|||||||
14
.github/workflows/PublishTestResults.yml
vendored
14
.github/workflows/PublishTestResults.yml
vendored
@@ -49,6 +49,11 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
default: '"--pytest=rewrite-dunder-init;reduce-depth:pytest.tests.unit"'
|
default: '"--pytest=rewrite-dunder-init;reduce-depth:pytest.tests.unit"'
|
||||||
type: string
|
type: string
|
||||||
|
testsuite-summary-name:
|
||||||
|
description: 'Set TestsuiteSummary name.'
|
||||||
|
required: false
|
||||||
|
default: ''
|
||||||
|
type: string
|
||||||
publish:
|
publish:
|
||||||
description: 'Publish test report summary via Dorny Test-Reporter'
|
description: 'Publish test report summary via Dorny Test-Reporter'
|
||||||
required: false
|
required: false
|
||||||
@@ -59,6 +64,11 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
default: 'Unit Test Results'
|
default: 'Unit Test Results'
|
||||||
type: string
|
type: string
|
||||||
|
dorny:
|
||||||
|
description: 'Publish merged unittest results via Dorny Test-Reporter.'
|
||||||
|
required: false
|
||||||
|
default: true
|
||||||
|
type: boolean
|
||||||
codecov:
|
codecov:
|
||||||
description: 'Publish merged unittest results to Codecov.'
|
description: 'Publish merged unittest results to Codecov.'
|
||||||
required: false
|
required: false
|
||||||
@@ -101,13 +111,13 @@ jobs:
|
|||||||
|
|
||||||
- name: 🔁 Merge JUnit Unit Test Summaries
|
- name: 🔁 Merge JUnit Unit Test Summaries
|
||||||
run: |
|
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 }}"
|
printf "%s\n" "cat ${{ inputs.merged_junit_filename }}"
|
||||||
cat ${{ inputs.merged_junit_filename }}
|
cat ${{ inputs.merged_junit_filename }}
|
||||||
|
|
||||||
- name: 📊 Publish Unit Test Results
|
- name: 📊 Publish Unit Test Results
|
||||||
uses: dorny/test-reporter@v2
|
uses: dorny/test-reporter@v2
|
||||||
if: inputs.publish && inputs.report_title != ''
|
if: (inputs.dorny || inputs.publish) && inputs.report_title != ''
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.report_title }}
|
name: ${{ inputs.report_title }}
|
||||||
path: ${{ inputs.merged_junit_filename }}
|
path: ${{ inputs.merged_junit_filename }}
|
||||||
|
|||||||
6
.github/workflows/_Checking_JobTemplates.yml
vendored
6
.github/workflows/_Checking_JobTemplates.yml
vendored
@@ -110,6 +110,8 @@ jobs:
|
|||||||
coverage_report_json_filename: ${{ needs.ConfigParams.outputs.coverage_report_json_filename }}
|
coverage_report_json_filename: ${{ needs.ConfigParams.outputs.coverage_report_json_filename }}
|
||||||
coverage_html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }}
|
coverage_html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }}
|
||||||
coverage_report_html_directory: ${{ needs.ConfigParams.outputs.coverage_report_html_directory }}
|
coverage_report_html_directory: ${{ needs.ConfigParams.outputs.coverage_report_html_directory }}
|
||||||
|
codecov: true
|
||||||
|
codacy: true
|
||||||
secrets:
|
secrets:
|
||||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
CODACY_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
CODACY_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
||||||
@@ -117,12 +119,16 @@ jobs:
|
|||||||
PublishTestResults:
|
PublishTestResults:
|
||||||
uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@dev
|
uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@dev
|
||||||
needs:
|
needs:
|
||||||
|
- ConfigParams
|
||||||
- UnitTestingParams
|
- UnitTestingParams
|
||||||
- UnitTesting
|
- UnitTesting
|
||||||
- PlatformTesting
|
- PlatformTesting
|
||||||
with:
|
with:
|
||||||
additional_merge_args: '-d "--pytest=rewrite-dunder-init;reduce-depth:pytest.tests.unit;reduce-depth:pytest.tests.platform"'
|
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 }}
|
merged_junit_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}
|
||||||
|
codecov: true
|
||||||
|
dorny: true
|
||||||
secrets:
|
secrets:
|
||||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
package_namespace: pyExamples
|
package_namespace: pyExamples
|
||||||
package_name: Extensions
|
package_name: Extensions
|
||||||
|
codecov: true
|
||||||
|
codacy: true
|
||||||
|
dorny: true
|
||||||
secrets:
|
secrets:
|
||||||
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
|
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
|
||||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ jobs:
|
|||||||
uses: pyTooling/Actions/.github/workflows/CompletePipeline.yml@dev
|
uses: pyTooling/Actions/.github/workflows/CompletePipeline.yml@dev
|
||||||
with:
|
with:
|
||||||
package_name: pyDummy
|
package_name: pyDummy
|
||||||
|
codecov: true
|
||||||
|
codacy: true
|
||||||
|
dorny: true
|
||||||
cleanup: false
|
cleanup: false
|
||||||
secrets:
|
secrets:
|
||||||
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
|
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
|
||||||
|
|||||||
Reference in New Issue
Block a user