mirror of
https://github.com/pyTooling/Actions.git
synced 2026-02-12 02:56: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
|
||||
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 }}
|
||||
@@ -226,8 +243,12 @@ jobs:
|
||||
- UnitTesting
|
||||
with:
|
||||
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 }}
|
||||
|
||||
|
||||
4
.github/workflows/PublishCoverageResults.yml
vendored
4
.github/workflows/PublishCoverageResults.yml
vendored
@@ -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:
|
||||
|
||||
14
.github/workflows/PublishTestResults.yml
vendored
14
.github/workflows/PublishTestResults.yml
vendored
@@ -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
|
||||
@@ -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 }}
|
||||
|
||||
8
.github/workflows/_Checking_JobTemplates.yml
vendored
8
.github/workflows/_Checking_JobTemplates.yml
vendored
@@ -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:
|
||||
@@ -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,12 +119,16 @@ 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"'
|
||||
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 }}
|
||||
|
||||
|
||||
@@ -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 }}
|
||||
|
||||
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user