Skip to content

Commit

Permalink
Display missing test paths in a GitHub compatible format.
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <[email protected]>
  • Loading branch information
dblock committed Nov 26, 2024
1 parent 8df8a42 commit 8513b21
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/test-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,16 @@ jobs:

- name: Display Missing Test Paths
run: |
jq -sc '
(map(.operations) | add | unique) as $all |
(map(.evaluated_operations) | add | unique) as $evaluated |
$all-$evaluated |
sort_by(.path) |
.[] |
"\(.method) \(.path)"
' $(find ./ -name "test-spec-coverage-*.json")
jq -r -sc '
(map(.operations) | add | unique) as $all |
(map(.evaluated_operations) | add | unique) as $evaluated |
($all-$evaluated | map({path: .path, method: .method, evaluated: false})) as $unevaluated |
($evaluated | map({path: .path, method: .method, evaluated: true})) as $evaluated |
$evaluated+$unevaluated |
sort_by(.path) |
map(if .evaluated then "-[x] \(.method) \(.path)" else "-[ ] \(.method) \(.path)" end) |
.[]
' $(find ./ -name "test-spec-coverage-*.json")
- name: Combine Test Coverage Data
shell: bash -eo pipefail {0}
Expand Down

0 comments on commit 8513b21

Please sign in to comment.