Skip to content

Commit 0f17cf7

Browse files
committed
Improve CI testing
1 parent 84c5eb0 commit 0f17cf7

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

.github/workflows/test.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: 'build-test'
2-
on: # rebuild any PRs and main branch changes
2+
3+
on:
34
pull_request:
45
push:
56
branches:
@@ -19,16 +20,22 @@ jobs:
1920
runs-on: ubuntu-latest
2021
steps:
2122
- uses: actions/checkout@v3
22-
- uses: ./
23+
- name: Run action
24+
uses: ./
2325
with:
2426
sarifFile: test-data/webgoat.sarif
25-
- run: grep -c '"owasp-top10-2021"' test-data/webgoat.sarif
27+
outputFile: test-data/webgoat-with-security-standard-tag.sarif
28+
- name: Check output
29+
run: |
30+
grep -c '"owasp-top10-2021"' test-data/webgoat-with-security-standard-tag.sarif
31+
diff test-data/webgoat-with-security-standard-tag.sarif test-data/webgoat-with-security-standard-tag.sarif.expected
32+
- name: Check error handling
33+
uses: ./
34+
continue-on-error: true
35+
with:
36+
sarifFile: test-data/webgoat1.sarif
2637
- name: Archive SARIF output
2738
uses: actions/upload-artifact@v3
2839
with:
2940
name: sarif-output
30-
path: test-data/webgoat.sarif
31-
- uses: ./
32-
continue-on-error: true
33-
with:
34-
sarifFile: test-data/webgoat1.sarif
41+
path: test-data/webgoat-with-security-standard-tag.sarif

test-data/webgoat-with-security-standard-tag.sarif.expected

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)