Skip to content

Commit

Permalink
feat(compliance): use correct path
Browse files Browse the repository at this point in the history
  • Loading branch information
0xfourzerofour committed Dec 18, 2023
1 parent cda520e commit 258d46e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/compliance-parser.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

# Parse the XML data
errors=$(xmllint --xpath 'string(//testsuite/@errors)' "$1")
failures=$(xmllint --xpath 'string(//testsuite/@failures)' "$1")
test_count=$(xmllint --xpath 'string(//testsuite/@tests)' "$1")

# Check if there are any errors or failures
if [[ $errors -gt 0 || $failures -gt 0 ]]; then
echo "ERROR: Tests failed!"
echo "$failures tests failed, $errors errors. out of $test_count tests"
exit 1
else
echo "SUCCESS: All tests passed!"
echo "$test_count tests passed."
fi
3 changes: 3 additions & 0 deletions .github/workflows/compliance-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ jobs:

- name: Run test executor
run: ./bundler-test-executors/runall.sh ./bundler-test-executors/bundlers/rundler/rundler.yml

- name: Parse spec results
run: ../compliance-parser.sh ./bundler-test-executors/build/out/rundler.xml

0 comments on commit 258d46e

Please sign in to comment.