Skip to content

Commit

Permalink
👻 improve CI (konveyor#94)
Browse files Browse the repository at this point in the history
* ✨ improve CI

Signed-off-by: Pranav Gaikwad <[email protected]>

* ✨ update

Signed-off-by: Pranav Gaikwad <[email protected]>

* sort tags

Signed-off-by: Pranav Gaikwad <[email protected]>

---------

Signed-off-by: Pranav Gaikwad <[email protected]>
  • Loading branch information
pranavgaikwad authored Oct 20, 2023
1 parent 2b3b019 commit a6109ad
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,15 @@ 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 \
| yq e '.[]?.violations |= (. | to_entries | sort_by(.key) | from_entries)' \
| yq e '.[]?.violations[]?.incidents |= sort_by(.uri)' \
| yq e '.[] | (.tags // []) |= sort'
}
filter_and_sort $expected_file > $expected_file
filter_and_sort $actual_file > $actual_file
diff $expected_file $actual_file
- name: Fail if dependencies output does not match expected
run: |
Expand Down

0 comments on commit a6109ad

Please sign in to comment.