feat: add merge-sarif

This commit is contained in:
2026-02-13 20:20:08 +01:00
parent 09fb31ca3a
commit 074556ca44
5 changed files with 247 additions and 0 deletions
+22
View File
@@ -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."