mirror of
https://github.com/pyTooling/Actions.git
synced 2026-02-12 11:06:56 +08:00
Fixed artifact name checking.
This commit is contained in:
19
.github/actions/CheckArtifactNames/action.yml
vendored
19
.github/actions/CheckArtifactNames/action.yml
vendored
@@ -26,6 +26,9 @@ runs:
|
|||||||
id: check
|
id: check
|
||||||
shell: python
|
shell: python
|
||||||
run: |
|
run: |
|
||||||
|
from json import loads as json_loads
|
||||||
|
from sys import exit
|
||||||
|
|
||||||
from pyTooling.Common import zipdicts
|
from pyTooling.Common import zipdicts
|
||||||
|
|
||||||
actualArtifactNames = json_loads("""${{ inputs.generated-names }}""".replace("'", '"'))
|
actualArtifactNames = json_loads("""${{ inputs.generated-names }}""".replace("'", '"'))
|
||||||
@@ -52,15 +55,21 @@ runs:
|
|||||||
|
|
||||||
errors = 0
|
errors = 0
|
||||||
if len(actualArtifactNames) != len(expectedArtifacts):
|
if len(actualArtifactNames) != len(expectedArtifacts):
|
||||||
print(f"Number of 'artifact_names' does not match: {len(actualArtifactNames)} != {len(expectedArtifacts)}.")
|
print(f"❌ Number of 'artifact_names' does not match: {len(actualArtifactNames)} != {len(expectedArtifacts)}.")
|
||||||
errors += 1
|
errors += 1
|
||||||
else:
|
else:
|
||||||
|
print("✅ Number of 'artifact_names' as expected.")
|
||||||
|
print("Checking artifact names ...")
|
||||||
|
|
||||||
for key, actual, expected in zipdicts(actualArtifactNames, expectedArtifacts):
|
for key, actual, expected in zipdicts(actualArtifactNames, expectedArtifacts):
|
||||||
if actual != expected:
|
if actual != expected:
|
||||||
print(f"Artifact name '{key}' does not match: {actual} != {expected}.")
|
print(f" ❌ Artifact name '{key}' does not match: {actual} != {expected}.")
|
||||||
errors += 1
|
errors += 1
|
||||||
|
else:
|
||||||
|
print(f" ☑ Artifact name as expected: {key} ⇢ {actual}.")
|
||||||
|
|
||||||
if errors == 0:
|
if errors == 0:
|
||||||
print(f"All checks PASSED.")
|
print("✅ All checks PASSED.")
|
||||||
|
else:
|
||||||
exit(errors)
|
print(f"❌ Counted {errors} errors.")
|
||||||
|
exit(errors)
|
||||||
|
|||||||
4
.github/workflows/_Checking_Parameters.yml
vendored
4
.github/workflows/_Checking_Parameters.yml
vendored
@@ -120,10 +120,10 @@ jobs:
|
|||||||
uses: ./.github/actions/CheckJobMatrix
|
uses: ./.github/actions/CheckJobMatrix
|
||||||
with:
|
with:
|
||||||
expected-default-version: '3.14'
|
expected-default-version: '3.14'
|
||||||
expected-python-versions: '["3.9", "3.10", "3.11", "3.12", "3.13"]'
|
expected-python-versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]'
|
||||||
expected-systems: '["windows"]'
|
expected-systems: '["windows"]'
|
||||||
expected-exclude-jobs: '[]'
|
expected-exclude-jobs: '[]'
|
||||||
expected-include-jobs: '["mingw64:3.12", "ucrt64:3.12"]'
|
expected-include-jobs: '["mingw32:3.12", "mingw64:3.12"]'
|
||||||
generated-default-version: ${{ needs.Params_Systems.outputs.python_version }}
|
generated-default-version: ${{ needs.Params_Systems.outputs.python_version }}
|
||||||
generated-jobmatrix: ${{ needs.Params_Systems.outputs.python_jobs }}
|
generated-jobmatrix: ${{ needs.Params_Systems.outputs.python_jobs }}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user