Skip to content

Commit 1ad59fc

Browse files
ci: Add python-jsonschema/check-jsonschema pre-commit hook (#2480)
* Add https://github.com/python-jsonschema/check-jsonschema pre-commit hook. * Fix schema errors by converting 'choice' dispatch type, which is a string, to 'boolean'.
1 parent b0efa64 commit 1ad59fc

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

.github/workflows/bump-version.yml

+9-15
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@ on:
1212
- minor
1313
- major
1414
release_candidate:
15-
type: choice
16-
description: 'Release candidate?'
17-
options:
18-
- false
19-
- true
15+
type: boolean
16+
description: 'Release candidate'
17+
default: false
2018
new_version:
2119
description: 'New version to bump to'
2220
required: true
@@ -27,17 +25,13 @@ on:
2725
required: true
2826
type: string
2927
force:
30-
type: choice
31-
description: 'Force override check?'
32-
options:
33-
- false
34-
- true
28+
type: boolean
29+
description: 'Force override check'
30+
default: false
3531
dry_run:
36-
type: choice
37-
description: 'Perform a dry run to check?'
38-
options:
39-
- true
40-
- false
32+
type: boolean
33+
description: 'Perform a dry run to check'
34+
default: true
4135

4236
jobs:
4337
bump-version:

.github/workflows/publish-package.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@ on:
1717
workflow_dispatch:
1818
inputs:
1919
publish:
20-
type: choice
21-
description: 'Publish to TestPyPI?'
22-
options:
23-
- false
24-
- true
20+
type: boolean
21+
description: 'Publish to TestPyPI'
22+
default: false
2523

2624
concurrency:
2725
group: ${{ github.workflow }}-${{ github.ref }}

.pre-commit-config.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,11 @@ repos:
7373
- id: codespell
7474
files: ^.*\.(py|md|rst)$
7575
args: ["-w", "-L", "hist,gaus"]
76+
77+
- repo: https://github.com/python-jsonschema/check-jsonschema
78+
rev: 0.28.4
79+
hooks:
80+
- id: check-readthedocs
81+
args: ["--verbose"]
82+
- id: check-github-workflows
83+
args: ["--verbose"]

0 commit comments

Comments
 (0)