Skip to content

Commit

Permalink
ci: fold output for test_build_caches (#38168)
Browse files Browse the repository at this point in the history
* ci: fold output for test_build_caches

* Add comment for CI nested folding groups
  • Loading branch information
SubaruArai authored Aug 22, 2023
1 parent 173fc6a commit 21000b4
Showing 1 changed file with 23 additions and 16 deletions.
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():
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))

0 comments on commit 21000b4

Please sign in to comment.