Skip to content

Commit

Permalink
[#2035]: feature: Reference plugin JSON schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
rustatian authored Oct 29, 2024
2 parents 460433e + dfe53b9 commit 3911515
Show file tree
Hide file tree
Showing 9 changed files with 325 additions and 1,658 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: rr_json_schema_validation

on:
push:
branches:
- master
- stable
paths:
- '.rr*'
- 'schemas/**'
- '.github/workflows/schema.yaml'
pull_request:
paths:
- '.rr*'
- 'schemas/**'
- '.github/workflows/schema.yaml'

jobs:
validate-json-schema:
name: Validate JSON Schema files
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./schemas
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Setup nodejs
uses: actions/setup-node@v4
with:
node-version: "20"

- name: Install Test Script Dependencies
run: npm install

- name: Run Script
run: node test.js
18 changes: 0 additions & 18 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,6 @@ on:
pull_request:

jobs:
validate-config-file:
name: Validate config file
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Setup nodejs
uses: actions/setup-node@v4
with:
node-version: "14"

- name: Install linter
run: npm install -g ajv-cli # Package page: <https://www.npmjs.com/package/ajv-cli>

- name: Run linter
run: ajv validate --all-errors --verbose -s ./schemas/config/3.0.schema.json --spec=draft2019 -d ./.rr.yaml

golangci-lint:
name: Golang-CI (lint)
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ rr.exe
.vscode
.DS_Store
**/.DS_Store
**/node_modules
Loading

0 comments on commit 3911515

Please sign in to comment.