diff --git a/.github/actions/test-template/action.yml b/.github/actions/test-template/action.yml index 93ca3ab9c..4667dc366 100644 --- a/.github/actions/test-template/action.yml +++ b/.github/actions/test-template/action.yml @@ -23,7 +23,7 @@ inputs: description: "Test script to execute" required: true is_optional: - description: "Failure will cancel all other tests if set to true" + description: "Failure is ignored and other tests continue if set to true" required: false default: "false" is_unit_test: diff --git a/unit_tests/github_actions/test_optional_description.py b/unit_tests/github_actions/test_optional_description.py new file mode 100644 index 000000000..b99a85c18 --- /dev/null +++ b/unit_tests/github_actions/test_optional_description.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python3 +"""Regression test: is_optional description matches behavior.""" + +import sys + + +def main(): + with open(".github/actions/test-template/action.yml") as f: + content = f.read() + + if "Failure will cancel all other tests if set to true" in content: + print("BUG: is_optional description inverts the actual behavior") + sys.exit(1) + + if "is_optional:" not in content or "description:" not in content: + print("Could not find is_optional input description") + sys.exit(1) + + print("OK") + +