Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fold output for test_build_caches #38168

Merged
merged 2 commits into from
Aug 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 23 additions & 16 deletions test/test_build_caches.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,29 @@ def test_build_caches():

# also check topological order to prevent circular dependencies
for dist_name, cache in caches.items():
pkgs = {}
print("Parsing manifest files for '%s'" % dist_name)
for pkg_name, pkg_xml in cache.release_package_xmls.items():
# Collect parsing warnings and fail if version convention are not respected
warnings = []
pkgs[pkg_name] = parse_package_string(pkg_xml, warnings=warnings)
for warning in warnings:
if 'version conventions' in warning:
errors.append('%s: %s' % (pkg_name, warning))
else:
print('%s: WARNING: %s' % (pkg_name, warning))
print("Order all packages in '%s' topologically" % dist_name)
try:
topological_order_packages(pkgs)
except RuntimeError as e:
errors.append('%s: %s' % (dist_name, e))
# This fold is here since github actions doesn't support nested groups.
# We should remove it once it's supported.
# See: https://github.com/actions/toolkit/issues/1001
with Fold():
SubaruArai marked this conversation as resolved.
Show resolved Hide resolved
pkgs = {}
print("Parsing manifest files for '%s'" % dist_name)
for pkg_name, pkg_xml in cache.release_package_xmls.items():
# Collect parsing warnings and fail if version convention
# are not respected
warnings = []
pkgs[pkg_name] = parse_package_string(
pkg_xml, warnings=warnings
)
for warning in warnings:
if 'version conventions' in warning:
errors.append('%s: %s' % (pkg_name, warning))
else:
print('%s: WARNING: %s' % (pkg_name, warning))
print("Order all packages in '%s' topologically" % dist_name)
try:
topological_order_packages(pkgs)
except RuntimeError as e:
errors.append('%s: %s' % (dist_name, e))

if errors:
raise RuntimeError('\n'.join(errors))
Loading