4444 - name : Aggregate Reports
4545 if : failure()
4646 run : |
47+ echo >>$GITHUB_STEP_SUMMARY
48+ echo '```json' >>$GITHUB_STEP_SUMMARY
49+ jq --slurp --compact-output '.' reports/*/report.json >>$GITHUB_STEP_SUMMARY
50+ echo '```' >>$GITHUB_STEP_SUMMARY
51+
4752 cat <<EOF >>$GITHUB_STEP_SUMMARY
4853 # Failing Tests
4954
@@ -58,17 +63,20 @@ jobs:
5863 <tbody>
5964 EOF
6065
66+ jq --version
6167 jq --slurp --raw-output '
6268 map(.failed_tests) | flatten | map({
6369 klass,
6470 NAME,
6571 failure: .failures[0],
66- source_url: .source_location | if .[0] | contains("/gems/") then
67- (.[0] | capture("rails-(?<sha>.*?)/(?<path>.*)")) *
68- {line: .[1], server: "https://github.com", repo: "rails/rails"}
69- else
70- {path: .[0], line: .[1], sha: $ENV.GITHUB_SHA, repo: $ENV.GITHUB_REPOSITORY, server: $ENV.GITHUB_SERVER_URL}
71- end | "\(.server)/\(.repo)/blob/\(.sha)/\(.path)#L\(.line)"
72+ source_url: (
73+ .source_location | if (.[0] | contains("/gems/")) then
74+ (.[0] | capture("rails-(?<sha>.*?)/(?<path>.*)")) *
75+ {line: .[1], server: "https://github.com", repo: "rails/rails"}
76+ else
77+ {path: .[0], line: .[1], sha: $ENV.GITHUB_SHA, repo: $ENV.GITHUB_REPOSITORY, server: $ENV.GITHUB_SERVER_URL}
78+ end | "\(.server)/\(.repo)/blob/\(.sha)/\(.path)#L\(.line)"
79+ )
7280 }) | group_by(.) | map(.[0] * { count: length }) | sort[0:100][]
7381 | "<tr>"
7482 + "<td><strong>\(.count)</strong></td>"
0 commit comments