Skip to content

Commit c03bd13

Browse files
committed
Verify schemas on YAML files
1 parent 5f78211 commit c03bd13

File tree

4 files changed

+40
-7
lines changed

4 files changed

+40
-7
lines changed

.appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ test_script:
9494
artifacts:
9595
- path: result_images\*
9696
name: result_images
97-
type: zip
97+
type: Zip
9898

9999
on_finish:
100100
- conda install codecov

.github/ISSUE_TEMPLATE/bug_report.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ body:
88
attributes:
99
label: Bug summary
1010
description: Describe the bug in 1-2 short sentences
11-
placeholder:
12-
value:
1311
validations:
1412
required: true
1513
- type: textarea
@@ -19,7 +17,7 @@ body:
1917
description: >-
2018
If possible, please provide a minimum self-contained example.
2119
placeholder: Paste your code here. This field is automatically formatted as Python code.
22-
render: python
20+
render: Python
2321
validations:
2422
required: true
2523
- type: textarea

.github/codecov.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@ coverage:
1414
target: 50%
1515
if_no_uploads: error
1616
if_not_found: success
17-
if_ci_failed: failure
17+
if_ci_failed: error
1818
project:
1919
default: false
2020
library:
2121
target: 50%
2222
if_no_uploads: error
2323
if_not_found: success
24-
if_ci_failed: failure
24+
if_ci_failed: error
2525
paths:
2626
- '!lib/.*/tests/.*'
2727
tests:
2828
target: auto
2929
if_no_uploads: error
3030
if_not_found: success
31-
if_ci_failed: failure
31+
if_ci_failed: error
3232
paths:
3333
- 'lib/.*/tests/.*'

.pre-commit-config.yaml

+35
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,38 @@ repos:
7878
hooks:
7979
- id: yamllint
8080
args: ["--strict", "--config-file=.yamllint.yml"]
81+
- repo: https://github.com/python-jsonschema/check-jsonschema
82+
rev: 0.28.0
83+
hooks:
84+
# TODO: Re-enable this when https://github.com/microsoft/azure-pipelines-vscode/issues/567 is fixed.
85+
# - id: check-azure-pipelines
86+
- id: check-dependabot
87+
- id: check-github-workflows
88+
- id: check-jsonschema
89+
files: ^\.appveyor\.yml$
90+
args: ["--verbose", "--schemafile", "https://json.schemastore.org/appveyor.json"]
91+
- id: check-jsonschema
92+
files: ^\.circleci/config\.yml$
93+
args: ["--verbose", "--schemafile", "https://json.schemastore.org/circleciconfig.json"]
94+
- id: check-jsonschema
95+
files: ^\.github/FUNDING\.yml$
96+
args: ["--verbose", "--schemafile", "https://json.schemastore.org/github-funding.json"]
97+
- id: check-jsonschema
98+
files: ^\.github/ISSUE_TEMPLATE/config\.yml$
99+
args: ["--verbose", "--schemafile", "https://json.schemastore.org/github-issue-config.json"]
100+
- id: check-jsonschema
101+
files: ^\.github/ISSUE_TEMPLATE/.*\.yml$
102+
exclude: ^\.github/ISSUE_TEMPLATE/config\.yml$
103+
args: ["--verbose", "--schemafile", "https://json.schemastore.org/github-issue-forms.json"]
104+
- id: check-jsonschema
105+
files: ^\.github/codecov\.yml$
106+
args: ["--verbose", "--schemafile", "https://json.schemastore.org/codecov.json"]
107+
- id: check-jsonschema
108+
files: ^\.github/labeler\.yml$
109+
args: ["--verbose", "--schemafile", "https://json.schemastore.org/pull-request-labeler-5.json"]
110+
- id: check-jsonschema
111+
files: ^environment\.yml$
112+
args:
113+
- "--verbose"
114+
- "--schemafile"
115+
- "https://github.com/microsoft/vscode-python/raw/main/schemas/conda-environment.json"

0 commit comments

Comments
 (0)