Skip to content

Commit ef9bd32

Browse files
refactor: replace Python JSON validation with Go validation in integration workflow
1 parent 846111c commit ef9bd32

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed

.github/workflows/integration.yml

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -51,20 +51,16 @@ jobs:
5151
echo "Generated file $file is empty"
5252
exit 1
5353
fi
54-
python - "$file" <<'PY'
55-
import json, pathlib, sys
56-
path = pathlib.Path(sys.argv[1])
57-
try:
58-
with path.open() as fh:
59-
json.load(fh)
60-
except json.JSONDecodeError as exc:
61-
raise SystemExit(f"Invalid JSON in {path}: {exc}")
62-
PY
63-
done
64-
65-
- name: Upload AIBOM artifacts
66-
uses: actions/upload-artifact@v4
67-
with:
68-
name: aibom-integration
69-
path: dist/integration/*.json
70-
if-no-files-found: error
54+
go run . validate \
55+
--input "$file" \
56+
--log-level debug \
57+
--strict \
58+
--min-score 0.5
59+
done
60+
61+
- name: Upload AIBOM artifacts
62+
uses: actions/upload-artifact@v4
63+
with:
64+
name: aibom-integration
65+
path: dist/integration/*.json
66+
if-no-files-found: error

0 commit comments

Comments
 (0)