compat-json.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. name: Compatibility Data Validator
  2. on:
  3. push:
  4. paths:
  5. - "plugins/win-capture/data/compatibility.json"
  6. - "plugins/win-capture/data/package.json"
  7. pull_request:
  8. paths:
  9. - "plugins/win-capture/data/compatibility.json"
  10. - "plugins/win-capture/data/package.json"
  11. jobs:
  12. schema:
  13. name: Schema
  14. runs-on: [ubuntu-22.04]
  15. steps:
  16. - name: Checkout
  17. uses: actions/checkout@v3
  18. - name: Install & Configure Python
  19. run: |
  20. sudo apt install python3-dev
  21. python3 -m pip install jsonschema json_source_map
  22. - name: Validate Compatibility JSON Schema
  23. run: |
  24. JSON_FILES=(
  25. plugins/win-capture/data/compatibility.json
  26. plugins/win-capture/data/package.json
  27. )
  28. python3 CI/check-jsonschema.py "${JSON_FILES[@]}"
  29. - name: Annotate Errors
  30. if: failure()
  31. uses: yuzutech/[email protected]
  32. with:
  33. repo-token: "${{ secrets.GITHUB_TOKEN }}"
  34. title: "Compatibility JSON Errors"
  35. input: "./validation_errors.json"