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:
29
.github/workflows/CompletePipeline.yml
vendored
29
.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 }}
|
||||||
@@ -225,11 +242,15 @@ jobs:
|
|||||||
- UnitTestingParams
|
- UnitTestingParams
|
||||||
- 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"'
|
||||||
merged_junit_filename: ${{ needs.ConfigParams.outputs.unittest_merged_report_xml_filename }}
|
testsuite-summary-name: ${{ inputs.package_name }}
|
||||||
merged_junit_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}
|
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:
|
secrets:
|
||||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
|
||||||
# VerifyDocs:
|
# VerifyDocs:
|
||||||
# uses: pyTooling/Actions/.github/workflows/VerifyDocs.yml@dev
|
# uses: pyTooling/Actions/.github/workflows/VerifyDocs.yml@dev
|
||||||
|
|||||||
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:
|
||||||
|
|||||||
16
.github/workflows/PublishTestResults.yml
vendored
16
.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
|
||||||
@@ -83,7 +93,7 @@ jobs:
|
|||||||
uses: pyTooling/download-artifact@v4
|
uses: pyTooling/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
pattern: ${{ inputs.unittest_artifacts_pattern }}
|
pattern: ${{ inputs.unittest_artifacts_pattern }}
|
||||||
path: artifacts
|
path: artifacts
|
||||||
|
|
||||||
- name: 🔎 Inspect extracted artifact (tarball)
|
- name: 🔎 Inspect extracted artifact (tarball)
|
||||||
run: |
|
run: |
|
||||||
@@ -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 }}
|
||||||
|
|||||||
24
.github/workflows/_Checking_JobTemplates.yml
vendored
24
.github/workflows/_Checking_JobTemplates.yml
vendored
@@ -30,7 +30,7 @@ jobs:
|
|||||||
- ConfigParams
|
- ConfigParams
|
||||||
- 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 }}
|
||||||
coverage_report_html_directory: ${{ needs.ConfigParams.outputs.coverage_report_html_directory }}
|
coverage_report_html_directory: ${{ needs.ConfigParams.outputs.coverage_report_html_directory }}
|
||||||
@@ -47,9 +47,9 @@ jobs:
|
|||||||
- ConfigParams
|
- ConfigParams
|
||||||
- PlatformTestingParams
|
- PlatformTestingParams
|
||||||
with:
|
with:
|
||||||
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 }}
|
||||||
coverage_report_html_directory: ${{ needs.ConfigParams.outputs.coverage_report_html_directory }}
|
coverage_report_html_directory: ${{ needs.ConfigParams.outputs.coverage_report_html_directory }}
|
||||||
@@ -70,7 +70,7 @@ jobs:
|
|||||||
commands: |
|
commands: |
|
||||||
${{ needs.ConfigParams.outputs.mypy_prepare_command }}
|
${{ needs.ConfigParams.outputs.mypy_prepare_command }}
|
||||||
mypy --html-report htmlmypy -p ${{ needs.ConfigParams.outputs.package_fullname }}
|
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 }}
|
html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }}
|
||||||
|
|
||||||
DocCoverage:
|
DocCoverage:
|
||||||
@@ -80,7 +80,7 @@ jobs:
|
|||||||
- UnitTestingParams
|
- UnitTestingParams
|
||||||
with:
|
with:
|
||||||
python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
|
python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
|
||||||
directory: ${{ needs.ConfigParams.outputs.package_directors }}
|
directory : ${{ needs.ConfigParams.outputs.package_directors }}
|
||||||
# fail_below: 70
|
# fail_below: 70
|
||||||
|
|
||||||
Package:
|
Package:
|
||||||
@@ -91,7 +91,7 @@ jobs:
|
|||||||
- PlatformTesting
|
- PlatformTesting
|
||||||
with:
|
with:
|
||||||
python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
|
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:
|
PublishCoverageResults:
|
||||||
uses: pyTooling/Actions/.github/workflows/PublishCoverageResults.yml@dev
|
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_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,14 +119,18 @@ 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"'
|
||||||
merged_junit_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}
|
testsuite-summary-name: ${{ needs.ConfigParams.outputs.package_fullname }}
|
||||||
|
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 }}
|
||||||
|
|
||||||
# VerifyDocs:
|
# VerifyDocs:
|
||||||
# uses: pyTooling/Actions/.github/workflows/VerifyDocs.yml@dev
|
# uses: pyTooling/Actions/.github/workflows/VerifyDocs.yml@dev
|
||||||
|
|||||||
@@ -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