Skip to content

GitHub CI Schema Validation Test - DO NOT MERGE #28

GitHub CI Schema Validation Test - DO NOT MERGE

GitHub CI Schema Validation Test - DO NOT MERGE #28

name: Validate JSON Schemas
on:
pull_request:
paths:
- '**/theme.json'
- '**/styles/*.json'
- '**/assets/fonts/*.json'
env:
PR_PATHS: >-
'**/theme.json'
'**/styles/*.json'
'**/assets/fonts/*.json'
HUSKY: 0
jobs:
validate-schema:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Validate JSON files
run: node theme-utils.mjs validate-schema $(git diff --name-only HEAD^ -- ${{ env.PR_PATHS }} | tr '\n' ' ')