Add graalvm schema for org.fugerit.java:fj-doc-mod-opencsv #1052
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Validate library-and-framework-list.json" | |
on: | |
pull_request: | |
paths: | |
- 'library-and-framework-list*.json' | |
jobs: | |
validate-library-and-framework-list-json: | |
if: github.repository == 'oracle/graalvm-reachability-metadata' | |
name: "📋 Validate the JSON file" | |
runs-on: "ubuntu-20.04" | |
timeout-minutes: 5 | |
steps: | |
- name: "☁️ Checkout repository" | |
uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Check that the JSON file is well-formatted and sorted by artifact | |
run: | | |
JSON="library-and-framework-list.json" | |
if ! jq -e . "${JSON}" >/dev/null; then | |
echo "'${JSON}' fails to parse. Please make sure it is a valid JSON file." | |
exit 6 | |
fi | |
DIFF=$(diff "${JSON}" <(jq -s '.[] | sort_by(.artifact)' "${JSON}")) | |
if [[ -n "${DIFF}" ]]; then | |
echo "'${JSON}' is no longer sorted by artifact key. You can use 'jq' to sort it: 'sorted="$(jq -s '.[] | sort_by(.artifact)' ${JSON})" && echo -E "${sorted}" > ${JSON}" | |
exit 8 | |
fi | |
- name: Check that the JSON file conforms to the schema | |
run: | | |
pip install check-jsonschema | |
check-jsonschema --schemafile library-and-framework-list-schema.json library-and-framework-list.json |