diff --git a/.github/actions/CheckArtifactNames/action.yml b/.github/actions/CheckArtifactNames/action.yml index eaffd79..688da72 100644 --- a/.github/actions/CheckArtifactNames/action.yml +++ b/.github/actions/CheckArtifactNames/action.yml @@ -25,11 +25,12 @@ runs: - name: Check artifact names id: check shell: python - working-directory: ${{ inputs.path }} run: | from pyTooling.Common import zipdicts - expectedName = "Example" + actualArtifactNames = json_loads("""${{ inputs.generated-names }}""".replace("'", '"')) + + expectedName = "${{ inputs.prefix }}" expectedArtifacts = { "unittesting_xml": f"{expectedName}-UnitTestReportSummary-XML", "unittesting_html": f"{expectedName}-UnitTestReportSummary-HTML", @@ -49,9 +50,7 @@ runs: "documentation_pdf": f"{expectedName}-Documentation-PDF", } - actualArtifactNames = json_loads("""${{ inputs }}""".replace("'", '"')) errors = 0 - if len(actualArtifactNames) != len(expectedArtifacts): print(f"Number of 'artifact_names' does not match: {len(actualArtifactNames)} != {len(expectedArtifacts)}.") errors += 1 diff --git a/.github/actions/CheckJobMatrix/action.yml b/.github/actions/CheckJobMatrix/action.yml index 51ac89e..54c475d 100644 --- a/.github/actions/CheckJobMatrix/action.yml +++ b/.github/actions/CheckJobMatrix/action.yml @@ -45,23 +45,23 @@ runs: from json import loads as json_loads from sys import exit - expectedPythonVersion = """${{ inputs.expected-default-version }}""" - expectedPythons = json_loads("""${{ inputs.expected-python-versions }}""".replace("'", '"')) - expectedSystems = json_loads("""${{ inputs.expected-systems }}""".replace("'", '"')) - excludedJobs = json_loads("""${{ inputs.expected-exclude-jobs }}""".replace("'", '"')) - includeJobs = json_loads("""${{ inputs.expected-include-jobs }}""".replace("'", '"')) - expectedJobs = [f"{system}:{python}" for system in expectedSystems for python in expectedPythons if f"{system}:{python}" not in excludedJobs] + includeJobs - actualPythonVersion = """${{ inputs.generated-default-version }}""" actualPythonJobs = json_loads("""${{ inputs.generated-jobmatrix }}""".replace("'", '"')) - errors = 0 + expectedPythonVersion = """${{ inputs.expected-default-version }}""" + expectedPythons = json_loads("""${{ inputs.expected-python-versions }}""".replace("'", '"')) + expectedSystems = json_loads("""${{ inputs.expected-systems }}""".replace("'", '"')) + excludedJobs = json_loads("""${{ inputs.expected-exclude-jobs }}""".replace("'", '"')) + includeJobs = json_loads("""${{ inputs.expected-include-jobs }}""".replace("'", '"')) + expectedJobs = sorted([f"{system}:{python}" for system in expectedSystems for python in expectedPythons if f"{system}:{python}" not in excludedJobs] + includeJobs) + + errors = 0 if actualPythonVersion != expectedPythonVersion: print(f"'python_version' does not match: '{actualPythonVersion}' != '{expectedPythonVersion}'.") errors += 1 if len(actualPythonJobs) != len(expectedJobs): - print(f"Number of 'python_jobs' does not match: {len(actualPythonJobs)} != {len(expectedJobs)}.") + print(f"❌ Number of 'python_jobs' does not match: {len(actualPythonJobs)} != {len(expectedJobs)}.") print("Actual jobs:") for job in actualPythonJobs: if job['system'] == "msys2": @@ -74,9 +74,19 @@ runs: print(f" {job}") errors += 1 else: - print("❌ Checking job matrix is not implemented") + print("✅ Number of 'python_jobs' as expected.") + print("Checking job combinations ...") + + actualJobs = sorted([f"{job['system'] if job['system'] != 'msys2' else job['runtime'].lower()}:{job['python']}" for job in actualPythonJobs]) + for actual, expected in zip(actualJobs, expectedJobs): + if actual != expected: + print(f" ❌ Job does not match: {actual} != {expected}.") + errors += 1 + else: + print(f" ☑ Job as expected: {actual}.") if errors == 0: - print(f"All checks PASSED.") - - exit(errors) + print("✅ All checks PASSED.") + else: + print(f"❌ Counted {errors} errors.") + exit(errors) diff --git a/.github/workflows/_Checking_JobTemplates.yml b/.github/workflows/_Checking_JobTemplates.yml index e057334..9339017 100644 --- a/.github/workflows/_Checking_JobTemplates.yml +++ b/.github/workflows/_Checking_JobTemplates.yml @@ -15,7 +15,8 @@ jobs: uses: pyTooling/Actions/.github/workflows/Parameters.yml@dev with: package_name: 'myPackage' - python_version_list: '3.9 3.10 3.11 3.12 3.13 3.14 pypy-3.10 pypy-3.11' + 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.10 3.11 3.12 3.13 3.14 pypy-3.10 pypy-3.11' disable_list: 'windows-arm:pypy-3.10 windows-arm:pypy-3.11' PlatformTestingParams: diff --git a/.github/workflows/_Checking_NamespacePackage_Pipeline.yml b/.github/workflows/_Checking_NamespacePackage_Pipeline.yml index b937c9e..f12f00a 100644 --- a/.github/workflows/_Checking_NamespacePackage_Pipeline.yml +++ b/.github/workflows/_Checking_NamespacePackage_Pipeline.yml @@ -10,6 +10,7 @@ jobs: with: package_namespace: 'myFramework' 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 bandit: 'true' pylint: 'true' codecov: 'true' diff --git a/.github/workflows/_Checking_Parameters.yml b/.github/workflows/_Checking_Parameters.yml index 27ba22c..d83b6e0 100644 --- a/.github/workflows/_Checking_Parameters.yml +++ b/.github/workflows/_Checking_Parameters.yml @@ -97,7 +97,7 @@ jobs: - name: Checking job matrix from 'Params_PythonVersions' uses: ./.github/actions/CheckJobMatrix with: - expected-default-version: '3.13' + expected-default-version: '3.14' expected-python-versions: '["3.12", "3.13", "pypy-3.10", "pypy-3.11"]' expected-systems: '["ubuntu", "ubuntu-arm", "windows", "windows-arm", "macos", "macos-arm"]' expected-exclude-jobs: '["windows-arm:pypy-3.10", "windows-arm:pypy-3.11"]' @@ -119,7 +119,7 @@ jobs: - name: Checking job matrix from 'Params_Systems' uses: ./.github/actions/CheckJobMatrix with: - expected-default-version: '3.13' + expected-default-version: '3.14' expected-python-versions: '["3.9", "3.10", "3.11", "3.12", "3.13"]' expected-systems: '["windows"]' expected-exclude-jobs: '[]' @@ -141,7 +141,7 @@ jobs: - name: Checking job matrix from 'Params_Include' uses: ./.github/actions/CheckJobMatrix with: - expected-default-version: '3.13' + expected-default-version: '3.14' expected-python-versions: '["3.12"]' expected-systems: '["ubuntu", "windows", "macos", "macos-arm"]' expected-exclude-jobs: '[]' @@ -163,7 +163,7 @@ jobs: - name: Checking job matrix from 'Params_Exclude' uses: ./.github/actions/CheckJobMatrix with: - expected-default-version: '3.13' + expected-default-version: '3.14' expected-python-versions: '["3.13"]' expected-systems: '["ubuntu", "macos", "macos-arm"]' expected-exclude-jobs: '[]' @@ -185,7 +185,7 @@ jobs: - name: Checking job matrix from 'Params_Disable' uses: ./.github/actions/CheckJobMatrix with: - expected-default-version: '3.13' + expected-default-version: '3.14' expected-python-versions: '["3.13"]' expected-systems: '["ubuntu", "windows", "macos", "macos-arm"]' expected-exclude-jobs: '["windows:3.13"]' @@ -203,11 +203,11 @@ jobs: steps: - name: Checkout repository to access local Action uses: actions/checkout@v5 - + - name: Checking job matrix from 'Params_All' uses: ./.github/actions/CheckJobMatrix with: - expected-default-version: '3.13' + expected-default-version: '3.14' expected-python-versions: '["3.12", "3.13"]' expected-systems: '["ubuntu", "windows", "macos-arm"]' expected-exclude-jobs: '[]' diff --git a/.github/workflows/_Checking_SimplePackage_Pipeline.yml b/.github/workflows/_Checking_SimplePackage_Pipeline.yml index 9e8c670..c5d8290 100644 --- a/.github/workflows/_Checking_SimplePackage_Pipeline.yml +++ b/.github/workflows/_Checking_SimplePackage_Pipeline.yml @@ -9,6 +9,7 @@ jobs: uses: pyTooling/Actions/.github/workflows/CompletePipeline.yml@dev with: 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 bandit: 'true' pylint: 'true' codecov: 'true'