mirror of
https://github.com/jlengrand/coffeechat.git
synced 2026-03-10 08:11:20 +00:00
add JSON validation
This commit is contained in:
12
.github/workflows/validate-json.yml
vendored
12
.github/workflows/validate-json.yml
vendored
@@ -1,11 +1,11 @@
|
||||
name: Validate people.json Schema
|
||||
name: Validate people.json
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'people.json'
|
||||
|
||||
jobs:
|
||||
verify-json-schema:
|
||||
validate-json:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout this repository
|
||||
@@ -16,8 +16,14 @@ jobs:
|
||||
with:
|
||||
node-version: '18'
|
||||
|
||||
- name: Installing eslint & eslint-plugin-json
|
||||
run: npm i eslint eslint-plugin-json
|
||||
|
||||
- name: Validate the JSON
|
||||
run: eslint people.json
|
||||
|
||||
- name: Installing ajv CLI
|
||||
run: npm i -g ajv-cli
|
||||
|
||||
- name: Validate the Schema
|
||||
- name: Validate the JSON Schema
|
||||
run: ajv validate -s schema.json -d people.json --spec=draft2020
|
||||
|
||||
Reference in New Issue
Block a user