mirror of
https://github.com/pyTooling/Actions.git
synced 2026-02-12 11:06:56 +08:00
Updating r6 from v6.7.0
This commit is contained in:
52
.github/workflows/CompletePipeline.yml
vendored
52
.github/workflows/CompletePipeline.yml
vendored
@@ -177,6 +177,58 @@ jobs:
|
|||||||
exclude_list: ${{ inputs.unittest_exclude_list }}
|
exclude_list: ${{ inputs.unittest_exclude_list }}
|
||||||
disable_list: ${{ inputs.unittest_disable_list }}
|
disable_list: ${{ inputs.unittest_disable_list }}
|
||||||
|
|
||||||
|
VersionCheck:
|
||||||
|
name: ''
|
||||||
|
runs-on: 'ubuntu-24.04'
|
||||||
|
needs:
|
||||||
|
- Prepare
|
||||||
|
- UnitTestingParams
|
||||||
|
if: needs.Prepare.outputs.version != '' && needs.UnitTestingParams.outputs.package_version_file != ''
|
||||||
|
outputs:
|
||||||
|
code_version: ${{ steps.extract.outputs.code_version }}
|
||||||
|
steps:
|
||||||
|
- name: ⏬ Checkout repository
|
||||||
|
uses: actions/checkout@v5
|
||||||
|
with:
|
||||||
|
# The command 'git describe' (used for version) needs the history.
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: 🔧 Install pyTooling dependencies (native)
|
||||||
|
run: |
|
||||||
|
python -m pip install --disable-pip-version-check -U pyTooling
|
||||||
|
|
||||||
|
- name: Extract version from Python source file
|
||||||
|
id: extract
|
||||||
|
if: endsWith(needs.UnitTestingParams.outputs.package_version_file, '.py')
|
||||||
|
shell: python
|
||||||
|
run: |
|
||||||
|
from pathlib import Path
|
||||||
|
from sys import exit
|
||||||
|
from pyTooling.Packaging import extractVersionInformation
|
||||||
|
|
||||||
|
expectedVersion = "${{ needs.Prepare.outputs.version }}".strip()
|
||||||
|
|
||||||
|
versionFile = Path("${{ needs.UnitTestingParams.outputs.package_version_file }}")
|
||||||
|
if not versionFile.exists():
|
||||||
|
print(f"::error title=CompletePipeline::Version file '{versionFile}' not found.")
|
||||||
|
exit(1)
|
||||||
|
|
||||||
|
versionInformation = extractVersionInformation(versionFile)
|
||||||
|
print(f"expected: {expectedVersion}")
|
||||||
|
print(f"from code: {versionInformation.Version}")
|
||||||
|
|
||||||
|
if expectedVersion != versionInformation.Version:
|
||||||
|
print(f"::error title=CompletePipeline::Expected version does not version in Python code.")
|
||||||
|
exit(2)
|
||||||
|
|
||||||
|
# Write jobs to special file
|
||||||
|
github_output = Path(getenv("GITHUB_OUTPUT"))
|
||||||
|
print(f"GITHUB_OUTPUT: {github_output}")
|
||||||
|
with github_output.open("a+", encoding="utf-8") as f:
|
||||||
|
f.write(dedent(f"""\
|
||||||
|
code_version={versionInformation.Version}
|
||||||
|
"""))
|
||||||
|
|
||||||
UnitTesting:
|
UnitTesting:
|
||||||
uses: pyTooling/Actions/.github/workflows/UnitTesting.yml@r6
|
uses: pyTooling/Actions/.github/workflows/UnitTesting.yml@r6
|
||||||
needs:
|
needs:
|
||||||
|
|||||||
72
.github/workflows/Parameters.yml
vendored
72
.github/workflows/Parameters.yml
vendored
@@ -45,6 +45,11 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
default: ''
|
default: ''
|
||||||
type: string
|
type: string
|
||||||
|
version_file:
|
||||||
|
description: "Path to module containing the version ('__version__' variable)."
|
||||||
|
required: false
|
||||||
|
default: '__init__.py'
|
||||||
|
type: string
|
||||||
python_version:
|
python_version:
|
||||||
description: 'Python version.'
|
description: 'Python version.'
|
||||||
required: false
|
required: false
|
||||||
@@ -121,6 +126,9 @@ on:
|
|||||||
package_directory:
|
package_directory:
|
||||||
description: "The package's directory."
|
description: "The package's directory."
|
||||||
value: ${{ jobs.Parameters.outputs.package_directory }}
|
value: ${{ jobs.Parameters.outputs.package_directory }}
|
||||||
|
package_version_file:
|
||||||
|
description: "Path to the package's module containing the version ('__version__' variable)."
|
||||||
|
value: ${{ jobs.Parameters.outputs.package_version_file }}
|
||||||
artifact_basename:
|
artifact_basename:
|
||||||
description: "Artifact base name."
|
description: "Artifact base name."
|
||||||
value: ${{ jobs.Parameters.outputs.artifact_basename }}
|
value: ${{ jobs.Parameters.outputs.artifact_basename }}
|
||||||
@@ -136,14 +144,21 @@ jobs:
|
|||||||
name: ✎ Generate pipeline parameters
|
name: ✎ Generate pipeline parameters
|
||||||
runs-on: "ubuntu-${{ inputs.ubuntu_image_version }}"
|
runs-on: "ubuntu-${{ inputs.ubuntu_image_version }}"
|
||||||
outputs:
|
outputs:
|
||||||
python_version: ${{ steps.variables.outputs.python_version }}
|
python_version: ${{ steps.variables.outputs.python_version }}
|
||||||
package_fullname: ${{ steps.variables.outputs.package_fullname }}
|
package_fullname: ${{ steps.variables.outputs.package_fullname }}
|
||||||
package_directory: ${{ steps.variables.outputs.package_directory }}
|
package_directory: ${{ steps.variables.outputs.package_directory }}
|
||||||
artifact_basename: ${{ steps.variables.outputs.artifact_basename }}
|
package_version_file: ${{ steps.variables.outputs.package_version_file }}
|
||||||
artifact_names: ${{ steps.artifacts.outputs.artifact_names }}
|
artifact_basename: ${{ steps.variables.outputs.artifact_basename }}
|
||||||
python_jobs: ${{ steps.jobs.outputs.python_jobs }}
|
artifact_names: ${{ steps.artifacts.outputs.artifact_names }}
|
||||||
|
python_jobs: ${{ steps.jobs.outputs.python_jobs }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: ⏬ Checkout repository
|
||||||
|
uses: actions/checkout@v5
|
||||||
|
with:
|
||||||
|
# The command 'git describe' (used for version) needs the history.
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Generate a startup delay of ${{ inputs.pipeline-delay }} seconds
|
- name: Generate a startup delay of ${{ inputs.pipeline-delay }} seconds
|
||||||
id: delay
|
id: delay
|
||||||
if: inputs.pipeline-delay >= 0
|
if: inputs.pipeline-delay >= 0
|
||||||
@@ -162,6 +177,7 @@ jobs:
|
|||||||
python_version = "${{ inputs.python_version }}".strip()
|
python_version = "${{ inputs.python_version }}".strip()
|
||||||
package_namespace = "${{ inputs.package_namespace }}".strip()
|
package_namespace = "${{ inputs.package_namespace }}".strip()
|
||||||
package_name = "${{ inputs.package_name }}".strip()
|
package_name = "${{ inputs.package_name }}".strip()
|
||||||
|
version_file = "${{ inputs.version_file }}".strip()
|
||||||
name = "${{ inputs.name }}".strip()
|
name = "${{ inputs.name }}".strip()
|
||||||
|
|
||||||
if package_namespace == "":
|
if package_namespace == "":
|
||||||
@@ -174,16 +190,28 @@ jobs:
|
|||||||
package_fullname = f"{package_namespace}.{package_name}"
|
package_fullname = f"{package_namespace}.{package_name}"
|
||||||
package_directory = f"{package_namespace}/{package_name}"
|
package_directory = f"{package_namespace}/{package_name}"
|
||||||
|
|
||||||
|
packageDirectory = Path(package_directory)
|
||||||
|
packageVersionFile = packageDirectory / version_file
|
||||||
|
print(f"Check if package version file '{packageVersionFile}' exists ... ", end="")
|
||||||
|
if packageVersionFile.exists():
|
||||||
|
print("✅")
|
||||||
|
package_version_file = packageVersionFile.as_posix()
|
||||||
|
else:
|
||||||
|
print("❌")
|
||||||
|
package_version_file = ""
|
||||||
|
print(f"::warning title=Parameters::Version file '{packageVersionFile}' not found.")
|
||||||
|
|
||||||
artifact_basename = package_fullname if name == "" else name
|
artifact_basename = package_fullname if name == "" else name
|
||||||
if artifact_basename == "" or artifact_basename == ".":
|
if artifact_basename == "" or artifact_basename == ".":
|
||||||
print("::error title=Parameter::artifact_basename is empty.")
|
print("::error title=Parameters::artifact_basename is empty.")
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
print("Variables:")
|
print("Variables:")
|
||||||
print(f" python_version: {python_version}")
|
print(f" python_version: {python_version}")
|
||||||
print(f" package_fullname: {package_fullname}")
|
print(f" package_fullname: {package_fullname}")
|
||||||
print(f" package_directory: {package_directory}")
|
print(f" package_directory: {package_directory}")
|
||||||
print(f" artifact_basename: {artifact_basename}")
|
print(f" package_version_file: {package_directory}")
|
||||||
|
print(f" artifact_basename: {artifact_basename}")
|
||||||
|
|
||||||
# Write jobs to special file
|
# Write jobs to special file
|
||||||
github_output = Path(getenv("GITHUB_OUTPUT"))
|
github_output = Path(getenv("GITHUB_OUTPUT"))
|
||||||
@@ -193,6 +221,7 @@ jobs:
|
|||||||
python_version={python_version}
|
python_version={python_version}
|
||||||
package_fullname={package_fullname}
|
package_fullname={package_fullname}
|
||||||
package_directory={package_directory}
|
package_directory={package_directory}
|
||||||
|
package_version_file={package_version_file}
|
||||||
artifact_basename={artifact_basename}
|
artifact_basename={artifact_basename}
|
||||||
"""))
|
"""))
|
||||||
|
|
||||||
@@ -263,7 +292,7 @@ jobs:
|
|||||||
currentAlphaRelease = "3.15.0-a.1"
|
currentAlphaRelease = "3.15.0-a.1"
|
||||||
|
|
||||||
if systems == "":
|
if systems == "":
|
||||||
print("::error title=Parameter::system_list is empty.")
|
print("::error title=Parameters::system_list is empty.")
|
||||||
else:
|
else:
|
||||||
systems = [sys.strip() for sys in systems.split(" ")]
|
systems = [sys.strip() for sys in systems.split(" ")]
|
||||||
|
|
||||||
@@ -428,12 +457,13 @@ jobs:
|
|||||||
- name: Verify out parameters
|
- name: Verify out parameters
|
||||||
id: verify
|
id: verify
|
||||||
run: |
|
run: |
|
||||||
printf "python_version: %s\n" '${{ steps.variables.outputs.python_version }}'
|
printf "python_version: %s\n" '${{ steps.variables.outputs.python_version }}'
|
||||||
printf "package_fullname: %s\n" '${{ steps.variables.outputs.package_fullname }}'
|
printf "package_fullname: %s\n" '${{ steps.variables.outputs.package_fullname }}'
|
||||||
printf "package_directory: %s\n" '${{ steps.variables.outputs.package_directory }}'
|
printf "package_directory: %s\n" '${{ steps.variables.outputs.package_directory }}'
|
||||||
printf "artifact_basename: %s\n" '${{ steps.variables.outputs.artifact_basename }}'
|
printf "package_version_file: %s\n" '${{ steps.variables.outputs.package_version_file }}'
|
||||||
printf "====================\n"
|
printf "artifact_basename: %s\n" '${{ steps.variables.outputs.artifact_basename }}'
|
||||||
printf "artifact_names: %s\n" '${{ steps.artifacts.outputs.artifact_names }}'
|
printf "================================================================================\n"
|
||||||
printf "====================\n"
|
printf "artifact_names: %s\n" '${{ steps.artifacts.outputs.artifact_names }}'
|
||||||
printf "python_jobs: %s\n" '${{ steps.jobs.outputs.python_jobs }}'
|
printf "================================================================================\n"
|
||||||
printf "====================\n"
|
printf "python_jobs: %s\n" '${{ steps.jobs.outputs.python_jobs }}'
|
||||||
|
printf "================================================================================\n"
|
||||||
|
|||||||
2
.github/workflows/PublishReleaseNotes.yml
vendored
2
.github/workflows/PublishReleaseNotes.yml
vendored
@@ -549,7 +549,7 @@ jobs:
|
|||||||
)" \
|
)" \
|
||||||
'{"tag": $tag, "version": $version, "git-hash": $hash, "repository-url": $repo, "release-url": $release, "categories": $categories, "latest": $jsonLatest}' \
|
'{"tag": $tag, "version": $version, "git-hash": $hash, "repository-url": $repo, "release-url": $release, "categories": $categories, "latest": $jsonLatest}' \
|
||||||
)" \
|
)" \
|
||||||
'{"version": "$structVersion", "timestamp": $date, "meta": $jsonMeta, "files": {}}'
|
'{"version": $structVersion, "timestamp": $date, "meta": $jsonMeta, "files": {}}'
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
5
.github/workflows/_Checking_JobTemplates.yml
vendored
5
.github/workflows/_Checking_JobTemplates.yml
vendored
@@ -15,9 +15,8 @@ jobs:
|
|||||||
uses: pyTooling/Actions/.github/workflows/Parameters.yml@r6
|
uses: pyTooling/Actions/.github/workflows/Parameters.yml@r6
|
||||||
with:
|
with:
|
||||||
package_name: 'myPackage'
|
package_name: 'myPackage'
|
||||||
python_version: '3.13' # workaround to use Sphinx in Python 3.13 for sphinx_reports not yet supporting lxml 6.0
|
python_version_list: '3.11 3.12 3.13 3.14 pypy-3.11'
|
||||||
python_version_list: '3.10 3.11 3.12 3.13 3.14 pypy-3.10 pypy-3.11'
|
disable_list: 'windows-arm:pypy-3.11'
|
||||||
disable_list: 'windows-arm:pypy-3.10 windows-arm:pypy-3.11'
|
|
||||||
|
|
||||||
PlatformTestingParams:
|
PlatformTestingParams:
|
||||||
uses: pyTooling/Actions/.github/workflows/Parameters.yml@r6
|
uses: pyTooling/Actions/.github/workflows/Parameters.yml@r6
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
package_namespace: 'myFramework'
|
package_namespace: 'myFramework'
|
||||||
package_name: 'Extension'
|
package_name: 'Extension'
|
||||||
unittest_python_version: '3.13' # workaround to use Sphinx in Python 3.13 for sphinx_reports not yet supporting lxml 6.0
|
unittest_python_version_list: '3.11 3.12 3.13 3.14 pypy-3.11'
|
||||||
bandit: 'true'
|
bandit: 'true'
|
||||||
pylint: 'true'
|
pylint: 'true'
|
||||||
codecov: 'true'
|
codecov: 'true'
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ jobs:
|
|||||||
uses: pyTooling/Actions/.github/workflows/CompletePipeline.yml@r6
|
uses: pyTooling/Actions/.github/workflows/CompletePipeline.yml@r6
|
||||||
with:
|
with:
|
||||||
package_name: 'myPackage'
|
package_name: 'myPackage'
|
||||||
unittest_python_version: '3.13' # workaround to use Sphinx in Python 3.13 for sphinx_reports not yet supporting lxml 6.0
|
unittest_python_version_list: '3.11 3.12 3.13 3.14 pypy-3.11'
|
||||||
bandit: 'true'
|
bandit: 'true'
|
||||||
pylint: 'true'
|
pylint: 'true'
|
||||||
codecov: 'true'
|
codecov: 'true'
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ Example Pipelines
|
|||||||
.. code-block:: toml
|
.. code-block:: toml
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["setuptools >= 80.0", "wheel ~= 0.45", "pyTooling ~= 8.7"]
|
requires = ["setuptools >= 80.0", "wheel ~= 0.45", "pyTooling ~= 8.8"]
|
||||||
build-backend = "setuptools.build_meta"
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
[tool.mypy]
|
[tool.mypy]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
-r ../requirements.txt
|
-r ../requirements.txt
|
||||||
|
|
||||||
pyTooling ~= 8.7
|
pyTooling ~= 8.8
|
||||||
|
|
||||||
# Enforce latest version on ReadTheDocs
|
# Enforce latest version on ReadTheDocs
|
||||||
sphinx ~= 8.2
|
sphinx ~= 8.2
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
requires = [
|
requires = [
|
||||||
"setuptools >= 80.0",
|
"setuptools >= 80.0",
|
||||||
"wheel ~= 0.45",
|
"wheel ~= 0.45",
|
||||||
"pyTooling ~= 8.7"
|
"pyTooling ~= 8.8"
|
||||||
]
|
]
|
||||||
build-backend = "setuptools.build_meta"
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
@@ -38,23 +38,21 @@ junit_xml = "report/typing/StaticTypingSummary.xml"
|
|||||||
cobertura_xml_report = "report/typing"
|
cobertura_xml_report = "report/typing"
|
||||||
|
|
||||||
[tool.pytest]
|
[tool.pytest]
|
||||||
junit_xml = "report/unit/UnittestReportSummary.xml"
|
addopts = ["--tb=native"]
|
||||||
|
|
||||||
[tool.pyedaa-reports]
|
|
||||||
junit_xml = "report/unit/unittest.xml"
|
|
||||||
|
|
||||||
[tool.pytest.ini_options]
|
|
||||||
addopts = "--tb=native"
|
|
||||||
# Don't set 'python_classes = *' otherwise, pytest doesn't search for classes
|
# Don't set 'python_classes = *' otherwise, pytest doesn't search for classes
|
||||||
# derived from unittest.Testcase
|
# derived from unittest.Testcase
|
||||||
python_files = "*"
|
python_files = ["*"]
|
||||||
python_functions = "test_*"
|
python_functions = ["test_*"]
|
||||||
filterwarnings = [
|
filterwarnings = [
|
||||||
"error::DeprecationWarning",
|
"error::DeprecationWarning",
|
||||||
"error::PendingDeprecationWarning"
|
"error::PendingDeprecationWarning"
|
||||||
]
|
]
|
||||||
|
junit_xml = "report/unit/UnittestReportSummary.xml"
|
||||||
junit_logging = "all"
|
junit_logging = "all"
|
||||||
|
|
||||||
|
[tool.pyedaa-reports]
|
||||||
|
junit_xml = "report/unit/unittest.xml"
|
||||||
|
|
||||||
[tool.interrogate]
|
[tool.interrogate]
|
||||||
color = true
|
color = true
|
||||||
verbose = 1 # possible values: 0 (minimal output), 1 (-v), 2 (-vv)
|
verbose = 1 # possible values: 0 (minimal output), 1 (-v), 2 (-vv)
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
pyTooling ~= 8.7
|
pyTooling ~= 8.8
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
Coverage ~= 7.11
|
Coverage ~= 7.11
|
||||||
|
|
||||||
# Test Runner
|
# Test Runner
|
||||||
pytest ~= 8.4
|
pytest ~= 9.0
|
||||||
pytest-cov ~= 7.0
|
pytest-cov ~= 7.0
|
||||||
|
|
||||||
# Static Type Checking
|
# Static Type Checking
|
||||||
|
|||||||
Reference in New Issue
Block a user