Skip to content

Commit 800299c

Browse files
committed
[PLUTO-1411] Add script
1 parent 7f08cdf commit 800299c

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.github/workflows/it-test.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525
chmod +x cli-v2
2626
2727
- name: Run plugin tests
28+
id: run_tests
29+
continue-on-error: true
2830
run: |
2931
# Make the script executable
3032
chmod +x run-tool-tests.sh
@@ -34,6 +36,12 @@ jobs:
3436
tool_name=$(basename "$tool_dir")
3537
if [ -d "$tool_dir/test/src" ]; then
3638
echo "Running tests for $tool_name..."
37-
./run-tool-tests.sh "$tool_name"
39+
./run-tool-tests.sh "$tool_name" || true
3840
fi
39-
done
41+
done
42+
43+
- name: Check test results
44+
if: steps.run_tests.outcome == 'failure'
45+
run: |
46+
echo "Some tool tests failed. Please check the logs above for details."
47+
exit 1

run-tool-tests.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ cd "$TOOL_DIR"
3232
"$CLI_PATH" analyze --tool $TOOL_NAME --format sarif --output actual.sarif
3333

3434
# Convert absolute paths to relative paths in the output
35+
# Handle both path formats: with and without extra codacy-cli-v2
3536
sed -i 's|file:///home/runner/work/codacy-cli-v2/codacy-cli-v2/|file:///|g' actual.sarif
37+
sed -i 's|file:///home/runner/work/codacy-cli-v2/|file:///|g' actual.sarif
3638

3739
# Compare with expected output
3840
jq --sort-keys "." expected.sarif > expected.sorted.json

0 commit comments

Comments
 (0)