Skip to content

Added metadata for io.nats:jnats:2.16.11 (#311) #984

Added metadata for io.nats:jnats:2.16.11 (#311)

Added metadata for io.nats:jnats:2.16.11 (#311) #984

name: "Validate library-and-framework-list.json"
on: [push, pull_request]
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@v3
- 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