mirror of
https://github.com/pyTooling/Actions.git
synced 2026-02-12 02:56:56 +08:00
302 lines
14 KiB
YAML
302 lines
14 KiB
YAML
name: Verification of Job Templates
|
|
|
|
on:
|
|
push:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
Prepare:
|
|
uses: pyTooling/Actions/.github/workflows/PrepareJob.yml@dev
|
|
|
|
ConfigParams:
|
|
uses: pyTooling/Actions/.github/workflows/ExtractConfiguration.yml@dev
|
|
with:
|
|
package_name: myPackage
|
|
|
|
InstallParams:
|
|
uses: pyTooling/Actions/.github/workflows/Parameters.yml@dev
|
|
with:
|
|
package_name: myPackage
|
|
python_version_list: ''
|
|
|
|
UnitTestingParams:
|
|
uses: pyTooling/Actions/.github/workflows/Parameters.yml@dev
|
|
with:
|
|
name: myPackage
|
|
python_version_list: '3.9 3.10 3.11 3.12 3.13 pypy-3.10 pypy-3.11'
|
|
disable_list: 'windows-arm:pypy-3.10 windows-arm:pypy-3.11'
|
|
|
|
PlatformTestingParams:
|
|
uses: pyTooling/Actions/.github/workflows/Parameters.yml@dev
|
|
with:
|
|
name: Platform
|
|
python_version_list: ''
|
|
system_list: 'ubuntu ubuntu-arm windows windows-arm macos mingw64 clang64 ucrt64'
|
|
|
|
UnitTesting:
|
|
uses: pyTooling/Actions/.github/workflows/UnitTesting.yml@dev
|
|
needs:
|
|
- ConfigParams
|
|
- UnitTestingParams
|
|
with:
|
|
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_xml_directory: ${{ needs.ConfigParams.outputs.coverage_report_xml_directory }}
|
|
coverage_report_xml_filename: ${{ needs.ConfigParams.outputs.coverage_report_xml_filename }}
|
|
coverage_report_json_directory: ${{ needs.ConfigParams.outputs.coverage_report_json_directory }}
|
|
coverage_report_json_filename: ${{ needs.ConfigParams.outputs.coverage_report_json_filename }}
|
|
coverage_report_html_directory: ${{ needs.ConfigParams.outputs.coverage_report_html_directory }}
|
|
unittest_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}
|
|
unittest_html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_html }}
|
|
coverage_sqlite_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}
|
|
coverage_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_xml }}
|
|
coverage_json_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }}
|
|
coverage_html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }}
|
|
|
|
PlatformTesting:
|
|
uses: pyTooling/Actions/.github/workflows/UnitTesting.yml@dev
|
|
needs:
|
|
- ConfigParams
|
|
- PlatformTestingParams
|
|
with:
|
|
jobs: ${{ needs.PlatformTestingParams.outputs.python_jobs }}
|
|
# tests_directory: ""
|
|
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_xml_directory: ${{ needs.ConfigParams.outputs.coverage_report_xml_directory }}
|
|
coverage_report_xml_filename: ${{ needs.ConfigParams.outputs.coverage_report_xml_filename }}
|
|
coverage_report_json_directory: ${{ needs.ConfigParams.outputs.coverage_report_json_directory }}
|
|
coverage_report_json_filename: ${{ needs.ConfigParams.outputs.coverage_report_json_filename }}
|
|
coverage_report_html_directory: ${{ needs.ConfigParams.outputs.coverage_report_html_directory }}
|
|
unittest_xml_artifact: ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).unittesting_xml }}
|
|
unittest_html_artifact: ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).unittesting_html }}
|
|
coverage_sqlite_artifact: ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).codecoverage_sqlite }}
|
|
coverage_xml_artifact: ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).codecoverage_xml }}
|
|
coverage_json_artifact: ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).codecoverage_json }}
|
|
coverage_html_artifact: ${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).codecoverage_html }}
|
|
|
|
StaticTypeCheck:
|
|
uses: pyTooling/Actions/.github/workflows/StaticTypeCheck.yml@dev
|
|
needs:
|
|
- ConfigParams
|
|
- UnitTestingParams
|
|
with:
|
|
python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
|
|
commands: |
|
|
${{ needs.ConfigParams.outputs.mypy_prepare_command }}
|
|
mypy --html-report report/typing -p ${{ needs.ConfigParams.outputs.package_fullname }}
|
|
html_report: 'report/typing'
|
|
html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }}
|
|
|
|
DocCoverage:
|
|
uses: pyTooling/Actions/.github/workflows/CheckDocumentation.yml@dev
|
|
needs:
|
|
- ConfigParams
|
|
- UnitTestingParams
|
|
with:
|
|
python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
|
|
directory : ${{ needs.ConfigParams.outputs.package_directory }}
|
|
# fail_below: 70
|
|
|
|
Package:
|
|
uses: pyTooling/Actions/.github/workflows/Package.yml@dev
|
|
needs:
|
|
- UnitTestingParams
|
|
# - UnitTesting
|
|
# - PlatformTesting
|
|
with:
|
|
python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
|
|
artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }}
|
|
|
|
Install:
|
|
uses: pyTooling/Actions/.github/workflows/InstallPackage.yml@dev
|
|
needs:
|
|
- ConfigParams
|
|
- UnitTestingParams
|
|
- InstallParams
|
|
- Package
|
|
with:
|
|
jobs: ${{ needs.InstallParams.outputs.python_jobs }}
|
|
wheel: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }}
|
|
package_name: ${{ needs.ConfigParams.outputs.package_fullname }}
|
|
|
|
PublishCoverageResults:
|
|
uses: pyTooling/Actions/.github/workflows/PublishCoverageResults.yml@dev
|
|
needs:
|
|
- ConfigParams
|
|
- UnitTestingParams
|
|
- UnitTesting
|
|
- PlatformTesting
|
|
with:
|
|
coverage_sqlite_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}
|
|
coverage_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_xml }}
|
|
coverage_report_xml_directory: ${{ needs.ConfigParams.outputs.coverage_report_xml_directory }}
|
|
coverage_report_xml_filename: ${{ needs.ConfigParams.outputs.coverage_report_xml_filename }}
|
|
coverage_json_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }}
|
|
coverage_report_json_directory: ${{ needs.ConfigParams.outputs.coverage_report_json_directory }}
|
|
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: inherit
|
|
|
|
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: inherit
|
|
|
|
# VerifyDocs:
|
|
# uses: pyTooling/Actions/.github/workflows/VerifyDocs.yml@dev
|
|
# needs:
|
|
# - UnitTestingParams
|
|
# with:
|
|
# python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
|
|
|
|
Documentation:
|
|
uses: pyTooling/Actions/.github/workflows/SphinxDocumentation.yml@dev
|
|
needs:
|
|
- ConfigParams
|
|
- UnitTestingParams
|
|
- PublishTestResults
|
|
- PublishCoverageResults
|
|
# - VerifyDocs
|
|
with:
|
|
python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
|
|
coverage_report_json_directory: ${{ needs.ConfigParams.outputs.coverage_report_json_directory }}
|
|
unittest_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}
|
|
coverage_json_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }}
|
|
html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_html }}
|
|
latex_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_latex }}
|
|
|
|
IntermediateCleanUp:
|
|
uses: pyTooling/Actions/.github/workflows/IntermediateCleanUp.yml@dev
|
|
needs:
|
|
- UnitTestingParams
|
|
- PublishCoverageResults
|
|
- PublishTestResults
|
|
with:
|
|
sqlite_coverage_artifacts_prefix: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}-
|
|
xml_unittest_artifacts_prefix: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}-
|
|
|
|
PDFDocumentation:
|
|
uses: pyTooling/Actions/.github/workflows/LaTeXDocumentation.yml@dev
|
|
needs:
|
|
- UnitTestingParams
|
|
- Documentation
|
|
with:
|
|
document: 'Actions'
|
|
latex_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_latex }}
|
|
pdf_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_pdf }}
|
|
|
|
PublishToGitHubPages:
|
|
uses: pyTooling/Actions/.github/workflows/PublishToGitHubPages.yml@dev
|
|
needs:
|
|
- UnitTestingParams
|
|
- Documentation
|
|
- PDFDocumentation
|
|
- PublishCoverageResults
|
|
- StaticTypeCheck
|
|
with:
|
|
doc: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_html }}
|
|
coverage: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }}
|
|
typing: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }}
|
|
|
|
TriggerTaggedRelease:
|
|
uses: pyTooling/Actions/.github/workflows/TagReleaseCommit.yml@dev
|
|
needs:
|
|
- Prepare
|
|
- UnitTesting
|
|
- PlatformTesting
|
|
- Install
|
|
# - StaticTypeCheck
|
|
- Package
|
|
- PublishToGitHubPages
|
|
permissions:
|
|
contents: write # required for create tag
|
|
actions: write # required for trigger workflow
|
|
with:
|
|
version: ${{ needs.Prepare.outputs.version }}
|
|
auto_tag: ${{ needs.Prepare.outputs.is_release_commit }}
|
|
secrets: inherit
|
|
|
|
ReleasePage:
|
|
uses: pyTooling/Actions/.github/workflows/PublishReleaseNotes.yml@dev
|
|
needs:
|
|
- Prepare
|
|
- UnitTesting
|
|
- PlatformTesting
|
|
- Install
|
|
# - StaticTypeCheck
|
|
- Package
|
|
- PublishToGitHubPages
|
|
if: needs.Prepare.outputs.is_release_tag == 'true'
|
|
permissions:
|
|
contents: write
|
|
actions: write
|
|
with:
|
|
tag: ${{ needs.Prepare.outputs.version }}
|
|
secrets: inherit
|
|
|
|
PublishOnPyPI:
|
|
uses: pyTooling/Actions/.github/workflows/PublishOnPyPI.yml@dev
|
|
needs:
|
|
- UnitTestingParams
|
|
- ReleasePage
|
|
# - Package
|
|
if: needs.Prepare.outputs.is_release_tag == 'true'
|
|
with:
|
|
python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
|
|
requirements: -r dist/requirements.txt
|
|
artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }}
|
|
secrets: inherit
|
|
|
|
ArtifactCleanUp:
|
|
uses: pyTooling/Actions/.github/workflows/ArtifactCleanUp.yml@dev
|
|
needs:
|
|
- UnitTestingParams
|
|
- PlatformTestingParams
|
|
- UnitTesting
|
|
- StaticTypeCheck
|
|
- PlatformTesting
|
|
- Documentation
|
|
- PDFDocumentation
|
|
- PublishTestResults
|
|
- PublishCoverageResults
|
|
- PublishToGitHubPages
|
|
- IntermediateCleanUp
|
|
with:
|
|
package: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }}
|
|
remaining: |
|
|
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}-*
|
|
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_html }}-*
|
|
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_xml }}-*
|
|
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }}-*
|
|
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }}-*
|
|
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}
|
|
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_html }}
|
|
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}
|
|
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_xml }}
|
|
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }}
|
|
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }}
|
|
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }}
|
|
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_html }}
|
|
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_latex }}
|
|
${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).unittesting_xml }}-*
|
|
${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).unittesting_html }}-*
|
|
${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).codecoverage_xml }}-*
|
|
${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).codecoverage_json }}-*
|
|
${{ fromJson(needs.PlatformTestingParams.outputs.artifact_names).codecoverage_html }}-*
|