Skip to content

Commit

Permalink
test: Add runtests schema and automatically validate in VSCode (#3416)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackgerrits committed Oct 22, 2021
1 parent 48da7f4 commit 81a8689
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .vscode/settings.json
@@ -0,0 +1,10 @@
{
"json.schemas": [
{
"fileMatch": [
"runtests.AUTOGEN.json"
],
"url": "./test/runtests.schema.json"
}
]
}
58 changes: 58 additions & 0 deletions test/runtests.schema.json
@@ -0,0 +1,58 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "http://vowpalwabbit.org/schemas/runtests.schema.json",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"desc": {
"type": "string"
},
"vw_command": {
"type": "string"
},
"bash_command": {
"type": "string"
},
"diff_files": {
"type": "object",
"patternProperties": {
"^.*$": {
"type": "string"
}
}
},
"input_files": {
"type": "array",
"items": {
"type": "string"
}
},
"depends_on": {
"type": "array",
"items": {
"type": "number"
}
}
},
"required": [
"id"
],
"oneOf": [
{
"required": [
"vw_command"
]
},
{
"required": [
"bash_command"
]
}
],
"additionalProperties": false
}
}

0 comments on commit 81a8689

Please sign in to comment.