Skip to content

Commit 1bb8c3d

Browse files
committed
add semgrep test
1 parent 80771c4 commit 1bb8c3d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/it-test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Pylint plugin test
1+
name: plugin it-test
22

33
permissions:
44
contents: write
@@ -37,8 +37,8 @@ jobs:
3737
# Convert absolute paths to relative paths in the output
3838
sed -i 's|file:///home/runner/work/codacy-cli-v2/codacy-cli-v2/|file:///|g' actual.sarif
3939
# Compare with expected output
40-
jq --sort-keys . expected.sarif > expected.sorted.json
41-
jq --sort-keys . actual.sarif > actual.sorted.json
40+
jq --sort-keys '.runs[0].tool.driver.rules |= sort_by(.id)' expected.sarif > expected.sorted.json
41+
jq --sort-keys '.runs[0].tool.driver.rules |= sort_by(.id)' actual.sarif > actual.sorted.json
4242
diff expected.sorted.json actual.sorted.json
4343
4444
- name: Run Semgrep plugin tests
@@ -54,6 +54,6 @@ jobs:
5454
# Convert absolute paths to relative paths in the output
5555
sed -i 's|file:///home/runner/work/codacy-cli-v2/codacy-cli-v2/|file:///|g' actual.sarif
5656
# Compare with expected output
57-
jq --sort-keys . expected.sarif > expected.sorted.json
58-
jq --sort-keys . actual.sarif > actual.sorted.json
57+
jq --sort-keys '.runs[0].tool.driver.rules |= sort_by(.id)' expected.sarif > expected.sorted.json
58+
jq --sort-keys '.runs[0].tool.driver.rules |= sort_by(.id)' actual.sarif > actual.sorted.json
5959
diff expected.sorted.json actual.sorted.json

0 commit comments

Comments
 (0)