From 772908dd9ee314193fbef176226a355ba998e907 Mon Sep 17 00:00:00 2001 From: SubaruArai Date: Mon, 7 Aug 2023 10:27:53 +0900 Subject: [PATCH 1/2] ci: fold output for test_build_caches --- test/test_build_caches.py | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/test/test_build_caches.py b/test/test_build_caches.py index 1bf3957bbb760..89906c2f1a580 100644 --- a/test/test_build_caches.py +++ b/test/test_build_caches.py @@ -36,22 +36,26 @@ 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)) + 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)) From 157f16b576705c8fc43c5023f3d3e6e0d48aff93 Mon Sep 17 00:00:00 2001 From: SubaruArai <78188579+SubaruArai@users.noreply.github.com> Date: Wed, 9 Aug 2023 09:56:45 +0900 Subject: [PATCH 2/2] Add comment for CI nested folding groups --- test/test_build_caches.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/test_build_caches.py b/test/test_build_caches.py index 89906c2f1a580..a83c21360093e 100644 --- a/test/test_build_caches.py +++ b/test/test_build_caches.py @@ -36,6 +36,9 @@ def test_build_caches(): # also check topological order to prevent circular dependencies for dist_name, cache in caches.items(): + # 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)