mirror of
https://github.com/pyTooling/Actions.git
synced 2026-02-12 02:56:56 +08:00
Improve mypy execution and less dependencies and manual/hard-coded Bash commands.
This commit is contained in:
7
.github/workflows/CompletePipeline.yml
vendored
7
.github/workflows/CompletePipeline.yml
vendored
@@ -196,11 +196,8 @@ jobs:
|
||||
- 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 }}
|
||||
html_report: ${{ needs.ConfigParams.outputs.typing_report_html_directory }}
|
||||
html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }}
|
||||
|
||||
DocCoverage:
|
||||
uses: pyTooling/Actions/.github/workflows/CheckDocumentation.yml@dev
|
||||
|
||||
9
.github/workflows/ExtractConfiguration.yml
vendored
9
.github/workflows/ExtractConfiguration.yml
vendored
@@ -98,6 +98,10 @@ on:
|
||||
coverage_report_json:
|
||||
description: ""
|
||||
value: ${{ jobs.Extract.outputs.coverage_report_json }}
|
||||
typing_report_html_directory:
|
||||
description: ""
|
||||
value: ${{ jobs.Extract.outputs.typing_report_html_directory }}
|
||||
|
||||
|
||||
jobs:
|
||||
Extract:
|
||||
@@ -120,6 +124,7 @@ jobs:
|
||||
coverage_report_json_directory: ${{ steps.getVariables.outputs.coverage_report_json_directory }}
|
||||
coverage_report_json_filename: ${{ steps.getVariables.outputs.coverage_report_json_filename }}
|
||||
coverage_report_json: ${{ steps.getVariables.outputs.coverage_report_json }}
|
||||
typing_report_html_directory: ${{ steps.getVariables.outputs.typing_report_html_directory }}
|
||||
|
||||
steps:
|
||||
- name: ⏬ Checkout repository
|
||||
@@ -194,6 +199,7 @@ jobs:
|
||||
coverageXMLFile = Path("./coverage.xml")
|
||||
coverageJSONFile = Path("./coverage.json")
|
||||
coverageRC = "${{ inputs.coverage_config }}".strip()
|
||||
typingHTMLDirectory = Path("htmlmypy")
|
||||
|
||||
# Read output paths from 'pyproject.toml' file
|
||||
if coverageRC == "pyproject.toml":
|
||||
@@ -207,6 +213,7 @@ jobs:
|
||||
coverageHTMLDirectory = Path(pyProjectSettings["tool"]["coverage"]["html"]["directory"])
|
||||
coverageXMLFile = Path(pyProjectSettings["tool"]["coverage"]["xml"]["output"])
|
||||
coverageJSONFile= Path(pyProjectSettings["tool"]["coverage"]["json"]["output"])
|
||||
typingHTMLDirectory = Path(pyProjectSettings["tool"]["mypy"]["html_report"])
|
||||
else:
|
||||
print(f"File '{pyProjectFile}' not found.")
|
||||
print(f"::error title=FileNotFoundError::File '{pyProjectFile}' not found.")
|
||||
@@ -245,6 +252,7 @@ jobs:
|
||||
coverage_report_json_directory={coverageJSONFile.parent.as_posix()}
|
||||
coverage_report_json_filename={coverageJSONFile.name}
|
||||
coverage_report_json={coverageJSONFile.as_posix()}
|
||||
typing_report_html_directory={typingHTMLDirectory.as_posix()}
|
||||
"""))
|
||||
|
||||
print(dedent(f"""\
|
||||
@@ -254,4 +262,5 @@ jobs:
|
||||
coverage html: {coverageHTMLDirectory}
|
||||
coverage xml: {coverageXMLFile}
|
||||
coverage json: {coverageJSONFile}
|
||||
typing html: {typingHTMLDirectory}
|
||||
"""))
|
||||
|
||||
2
.github/workflows/LaTeXDocumentation.yml
vendored
2
.github/workflows/LaTeXDocumentation.yml
vendored
@@ -57,7 +57,7 @@ jobs:
|
||||
PDFDocumentation:
|
||||
name: 📓 Converting LaTeX Documentation to PDF
|
||||
runs-on: "ubuntu-${{ inputs.ubuntu_image_version }}"
|
||||
continue-on-error: ${{ inputs.can-fail }}
|
||||
continue-on-error: ${{ inputs.can-fail == 'true' }}
|
||||
steps:
|
||||
- name: 📥 Download artifacts '${{ inputs.latex_artifact }}' from 'SphinxDocumentation' job
|
||||
uses: pyTooling/download-artifact@v5
|
||||
|
||||
3
.github/workflows/PrepareJob.yml
vendored
3
.github/workflows/PrepareJob.yml
vendored
@@ -255,6 +255,9 @@ jobs:
|
||||
version=${version}
|
||||
EOF
|
||||
|
||||
# TODO: why not is_release_commit?
|
||||
# TODO: how to support version branches and hotfix releases on version branches?
|
||||
|
||||
- name: 🔁 Find merged PullRequest from second parent of current SHA (${{ github.sha }})
|
||||
id: FindPullRequest
|
||||
if: steps.Classify.outputs.is_merge_commit == 'true'
|
||||
|
||||
6
.github/workflows/StaticTypeCheck.yml
vendored
6
.github/workflows/StaticTypeCheck.yml
vendored
@@ -40,14 +40,10 @@ on:
|
||||
required: false
|
||||
default: '-r tests/requirements.txt'
|
||||
type: string
|
||||
commands:
|
||||
description: 'Commands to run the static type checks.'
|
||||
required: true
|
||||
type: string
|
||||
html_report:
|
||||
description: 'Directory to upload as an artifact.'
|
||||
required: false
|
||||
default: 'htmlmypy'
|
||||
default: 'report/typing'
|
||||
type: string
|
||||
junit_report:
|
||||
description: 'junit file to upload as an artifact.'
|
||||
|
||||
7
.github/workflows/_Checking_JobTemplates.yml
vendored
7
.github/workflows/_Checking_JobTemplates.yml
vendored
@@ -84,11 +84,8 @@ jobs:
|
||||
- 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 }}
|
||||
html_report: ${{ needs.ConfigParams.outputs.typing_report_html_directory }}
|
||||
html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }}
|
||||
|
||||
DocCoverage:
|
||||
uses: pyTooling/Actions/.github/workflows/CheckDocumentation.yml@dev
|
||||
|
||||
1
.github/workflows/_Checking_Nightly.yml
vendored
1
.github/workflows/_Checking_Nightly.yml
vendored
@@ -55,6 +55,7 @@ jobs:
|
||||
version=4.2.0
|
||||
tool=myTool
|
||||
prog=program
|
||||
tag: 4.2.0
|
||||
title: "Nightly Test Release"
|
||||
description: |
|
||||
This *nightly* release contains all latest and important artifacts created by %tool%'s CI pipeline.
|
||||
|
||||
Reference in New Issue
Block a user