Create ilp_0.1.json #261
This file contains hidden or 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: RTTcode Validation | |
| on: | |
| push: | |
| paths: | |
| - "docs/**.json" | |
| - "docs/schemas/**.json" | |
| - ".github/workflows/rttcode-validate.yml" | |
| pull_request: | |
| paths: | |
| - "docs/**.json" | |
| - "docs/schemas/**.json" | |
| jobs: | |
| validate-rttcode: | |
| name: Validate RTTcode Packets | |
| runs-on: ubuntu-latest | |
| permissions: write-all | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Install JSON Schema validator | |
| run: npm install -g ajv-cli | |
| - name: Validate RTTcode packets | |
| run: | | |
| echo "Validating RTTcode packets..." | |
| for file in $(find docs -name "*.json"); do | |
| if [[ "$file" == docs/schemas/* ]]; then | |
| continue | |
| fi | |
| echo "Checking: $file" | |
| ajv validate \ | |
| -s docs/schemas/rttcode.v1.json \ | |
| -d "$file" \ | |
| --strict=true \ | |
| || exit 1 | |
| done | |