feat: add merge-sarif
This commit is contained in:
@@ -82,3 +82,25 @@ jobs:
|
||||
|
||||
echo ""
|
||||
echo "All checks passed."
|
||||
|
||||
test-merge-sarif-files:
|
||||
name: Test Merge SARIF Files
|
||||
runs-on:
|
||||
- ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||
- name: Merge SARIF Files
|
||||
uses: ./merge-sarif-files
|
||||
with:
|
||||
files: |
|
||||
- merge-sarif-files/test_sarif1.json
|
||||
- merge-sarif-files/test_sarif2.json
|
||||
output-file: merged.sarif
|
||||
- name: Check merged SARIF file
|
||||
run: |
|
||||
runs=$(jq -r '.runs' merged.sarif)
|
||||
echo "Runs:"
|
||||
echo "$runs"
|
||||
# check that there are two runs in the array
|
||||
[ "$(echo "$runs" | jq 'length')" -eq 2 ] && echo "OK" || { echo "FAIL (got $(echo "$runs" | jq 'length'), expected 2)"; exit 1; }
|
||||
echo "All checks passed."
|
||||
|
||||
Reference in New Issue
Block a user