Skip to content

Commit

Permalink
fix: Ignore JSON when running OPA as it only supports rego (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbp-bvanb authored Dec 10, 2024
1 parent 8fcff69 commit 6e93f96
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,13 @@ tasks:
silent: true
cmds:
- |
opa_cmd="opa test . --ignore \"*.json\""
for dir in $(find . -type f -name '*.rego' -exec dirname {} \; | sort -u); do
echo "Running opa test in directory: $dir"
(cd "$dir" && opa test . -v --explain={{.QUERY_EXPLANATION}})
echo "Running ${opa_cmd} in directory: $dir"
(cd "$dir" && ${opa_cmd} -v --explain={{.QUERY_EXPLANATION}})
opa_code_coverage_overview=$(cd "$dir" && opa test . -c)
opa_code_coverage_overview=$(cd "$dir" && ${opa_cmd} -c)
echo "OPA code coverage overview:"
echo "${opa_code_coverage_overview}"
Expand Down

0 comments on commit 6e93f96

Please sign in to comment.