Skip to content

Commit

Permalink
Update check_jsons.yml to inline json validation check. (#675)
Browse files Browse the repository at this point in the history
* Update check_jsons.yml to inline json validation check.

* delete script and escape evaluation of filename
  • Loading branch information
prashanDYDX authored Sep 4, 2024
1 parent 03c39e1 commit 35cf9c9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/check_jsons.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

name: Python application
name: JSON Validation

on:
pull_request:
Expand All @@ -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
14 changes: 0 additions & 14 deletions scripts/ci_validate_json_files.sh

This file was deleted.

0 comments on commit 35cf9c9

Please sign in to comment.