Skip to content

Commit 15b304f

Browse files
committed
bits to make sarif comparison work
1 parent 42291ff commit 15b304f

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

.github/workflows/internal-pr-bundle-integration-test-cpp.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,23 @@ jobs:
8383
run: |
8484
# validate we have the actual sarif results
8585
echo "Checking SARIF file location at: ${{ steps.analysis.outputs.sarif-output }}"
86-
ls -l ${{ steps.analysis.outputs.sarif-output }}
86+
ls -l ${{ steps.analysis.outputs.sarif-output }}
87+
88+
- name: Upload SARIF Results
89+
uses: actions/upload-artifact@v2
90+
with:
91+
name: actual.sarif
92+
path: |
93+
${{ steps.analysis.outputs.sarif-output }}/*.sarif
94+
if-no-files-found: error
95+
96+
97+
- name: Validate SARIF Results
98+
shell: bash
99+
run: |
100+
# Compare the expected vs the actual
101+
102+
if ! diff integration/cpp/expected.sarif ${{ steps.analysis.outputs.sarif-output }}/cpp.sarif ; then
103+
echo "Expected file does not match actual. Please check the SARIF file for differences."
104+
exit 1
105+
fi

0 commit comments

Comments
 (0)