Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Add runtests schema and automatically validate in VSCode #3416

Merged
merged 3 commits into from Oct 22, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
}
}