diff --git a/.github/workflows/check_jsons.yml b/.github/workflows/check_jsons.yml index de918b024..e7995fe67 100644 --- a/.github/workflows/check_jsons.yml +++ b/.github/workflows/check_jsons.yml @@ -1,5 +1,5 @@ -name: Python application +name: JSON Validation on: pull_request: @@ -21,4 +21,15 @@ jobs: python-version: "3.10" - name: Validate JSONs run: | - ./scripts/ci_validate_json_files.sh + json_files=$(find . -name "*.json") + + # Validate JSON files + for file in $json_files + do + echo "Validating $file" + result=$(python -m json.tool "$file") + if [ $? -ne 0 ]; then + echo "Invalid JSON file: $file" + exit 1 + fi + done diff --git a/scripts/ci_validate_json_files.sh b/scripts/ci_validate_json_files.sh deleted file mode 100755 index 24d181859..000000000 --- a/scripts/ci_validate_json_files.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -json_files=$(find . -name "*.json") - -# Validate JSON files -for file in $json_files -do - echo "Validating $file" - result=`python -m json.tool $file` - if [ $? -ne 0 ]; then - echo "Invalid JSON file: $file" - exit 1 - fi -done \ No newline at end of file