Skip to content

Commit

Permalink
✨ improve CI
Browse files Browse the repository at this point in the history
Signed-off-by: Pranav Gaikwad <[email protected]>
  • Loading branch information
pranavgaikwad committed Oct 20, 2023
1 parent 77d1159 commit 722a6b3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@ jobs:
run: |
expected_file=./test-data/analysis-output.yaml
actual_file=./output/output.yaml
sed 's/^[ \t-]*//' $expected_file | sort -s > /tmp/expected_file
sed 's/^[ \t-]*//' $actual_file | sort -s > /tmp/actual_file
diff /tmp/expected_file /tmp/actual_file || diff $expected_file $actual_file
function filter_and_sort() {
yq e 'del(.[].skipped) | del(.[].unmatched)' $1 > /tmp/filtered
yq e '(.[] | select(.violations != null) | .violations |= (. | to_entries | sort_by(.key) | from_entries))' /tmp/filtered > $1
}
filter_and_sort $expected_file
filter_and_sort $actual_file
diff $expected_file $actual_file
- name: Fail if dependencies output does not match expected
run: |
Expand Down

0 comments on commit 722a6b3

Please sign in to comment.