mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-04 10:33:30 +00:00
CI: Validate compatibility schema
This commit is contained in:
parent
2e57e09036
commit
3fd7216661
40
.github/workflows/compat-json.yml
vendored
Normal file
40
.github/workflows/compat-json.yml
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
name: Compatibility Data Validator
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "plugins/win-capture/data/compatibility.json"
|
||||
- "plugins/win-capture/data/package.json"
|
||||
pull_request:
|
||||
paths:
|
||||
- "plugins/win-capture/data/compatibility.json"
|
||||
- "plugins/win-capture/data/package.json"
|
||||
|
||||
jobs:
|
||||
schema:
|
||||
name: Schema
|
||||
runs-on: [ubuntu-22.04]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install & Configure Python
|
||||
run: |
|
||||
sudo apt install python3-dev
|
||||
python3 -m pip install jsonschema json_source_map
|
||||
|
||||
- name: Validate Compatibility JSON Schema
|
||||
run: |
|
||||
JSON_FILES=(
|
||||
plugins/win-capture/data/compatibility.json
|
||||
plugins/win-capture/data/package.json
|
||||
)
|
||||
python3 CI/check-jsonschema.py "${JSON_FILES[@]}"
|
||||
|
||||
- name: Annotate Errors
|
||||
if: failure()
|
||||
uses: yuzutech/annotations-action@v0.4.0
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
title: "Compatibility JSON Errors"
|
||||
input: "./validation_errors.json"
|
Loading…
Reference in a new issue