Added 'disable_list'.

This commit is contained in:
Patrick Lehmann
2022-11-12 23:10:44 +01:00
parent 025cc4ff4e
commit 70e8f32351
2 changed files with 79 additions and 2 deletions

View File

@@ -38,6 +38,14 @@ jobs:
system_list: "ubuntu windows macos"
exclude_list: "windows:3.10 windows:3.11"
Params_Disable:
uses: pyTooling/Actions/.github/workflows/Parameters.yml@dev
with:
name: Example
python_version_list: "3.10"
system_list: "ubuntu windows macos"
disable_list: "windows:3.10 windows:3.11"
Params_All:
uses: pyTooling/Actions/.github/workflows/Parameters.yml@dev
with:
@@ -54,6 +62,7 @@ jobs:
- Params_Systems
- Params_Include
- Params_Exclude
- Params_Disable
- Params_All
runs-on: ubuntu-latest
defaults:
@@ -308,6 +317,55 @@ jobs:
print(f"All checks PASSED.")
exit(errors)
# Params_Disable
- name: Checking results from 'Params_Disable'
run: |
from json import loads as json_loads
from sys import exit
from pyTooling.Common import zipdicts
expectedPythonVersion = "3.11"
expectedPythons = ["3.10"]
expectedSystems = ["ubuntu", "macos"]
expectedJobs = [f"{system}:{python}" for system in expectedSystems for python in expectedPythons]
expectedName = "Example"
expectedArtifacts = {
"unittesting_xml": f"{expectedName}-TestReportSummary-XML",
"codecoverage_xml": f"{expectedName}-CodeCoverage-XML",
"codecoverage_html": f"{expectedName}-CodeCoverage-HTML",
"statictyping_html": f"{expectedName}-StaticTyping-HTML",
"package_all": f"{expectedName}-Packages",
"documentation_pdf": f"{expectedName}-Documentation-PDF",
"documentation_html": f"{expectedName}-Documentation-HTML",
}
actualPythonVersion = """${{ needs.Params_Exclude.outputs.python_version }}"""
actualPythonJobs = json_loads("""${{ needs.Params_Exclude.outputs.python_jobs }}""".replace("'", '"'))
actualArtifactNames = json_loads("""${{ needs.Params_Exclude.outputs.artifact_names }}""".replace("'", '"'))
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)}.")
for job in actualPythonJobs:
print(f" {job['system']}:{job['python']}")
errors += 1
if len(actualArtifactNames) != len(expectedArtifacts):
print(f"Number of 'artifact_names' does not match: {len(actualArtifactNames)} != {len(expectedArtifacts)}.")
errors += 1
else:
for key, actual, expected in zipdicts(actualArtifactNames, expectedArtifacts):
if actual != expected:
print(f"Artifact name '{key}' does not match: {actual} != {expected}.")
errors += 1
if errors == 0:
print(f"All checks PASSED.")
exit(errors)
# Params_All
- name: Checking results from 'Params_All'
run: |