Skip to content

Commit 8513b21

Browse files
committed
Display missing test paths in a GitHub compatible format.
Signed-off-by: dblock <[email protected]>
1 parent 8df8a42 commit 8513b21

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

.github/workflows/test-spec.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,16 @@ jobs:
126126

127127
- name: Display Missing Test Paths
128128
run: |
129-
jq -sc '
130-
(map(.operations) | add | unique) as $all |
131-
(map(.evaluated_operations) | add | unique) as $evaluated |
132-
$all-$evaluated |
133-
sort_by(.path) |
134-
.[] |
135-
"\(.method) \(.path)"
136-
' $(find ./ -name "test-spec-coverage-*.json")
129+
jq -r -sc '
130+
(map(.operations) | add | unique) as $all |
131+
(map(.evaluated_operations) | add | unique) as $evaluated |
132+
($all-$evaluated | map({path: .path, method: .method, evaluated: false})) as $unevaluated |
133+
($evaluated | map({path: .path, method: .method, evaluated: true})) as $evaluated |
134+
$evaluated+$unevaluated |
135+
sort_by(.path) |
136+
map(if .evaluated then "-[x] \(.method) \(.path)" else "-[ ] \(.method) \(.path)" end) |
137+
.[]
138+
' $(find ./ -name "test-spec-coverage-*.json")
137139
138140
- name: Combine Test Coverage Data
139141
shell: bash -eo pipefail {0}

0 commit comments

Comments
 (0)