collect_deps: Shorten summary_markdown

The summary_markdown was coming in at 18k but is limited to 4k. Move the
details that were in the summary_markdown into separate steps.

Bug: b/522852278
Change-Id: Id23a3ae127e9cf953f187096521f86aecd38b963
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/428192
diff --git a/recipes/collect_deps.py b/recipes/collect_deps.py
index e45eef8..bece122 100644
--- a/recipes/collect_deps.py
+++ b/recipes/collect_deps.py
@@ -147,12 +147,17 @@
     pres.properties['deps_map'] = deps_map
 
     # Summary
-    summary = ['Collected dependencies:']
-    for dep, projects in sorted(deps_map.items()):
-        summary.append(f'* **{dep}**: {", ".join(projects)}')
+    if deps_map:
+        with api.step.nest('dependencies'):
+            for dep, projects in sorted(deps_map.items()):
+                with api.step.nest(dep):
+                    for project in projects:
+                        api.step.empty(project)
+
+    summary = f'Collected dependencies for {len(deps_map)} modules.'
 
     return result_pb.RawResult(
-        summary_markdown='\n'.join(summary),
+        summary_markdown=summary,
         status=common_pb.SUCCESS,
     )
 
@@ -228,6 +233,16 @@
                 'pw_assert': ['project-a'],
             },
         ),
+        api.post_check(
+            post_process.MustRun, 'dependencies.pw_analog.project-a'
+        ),
+        api.post_check(
+            post_process.MustRun, 'dependencies.pw_assert.project-a'
+        ),
+        api.post_check(
+            post_process.SummaryMarkdown,
+            'Collected dependencies for 2 modules.',
+        ),
         api.post_process(post_process.DropExpectation),
     )