Skip to content

Commit

Permalink
ci: Add python-jsonschema/check-jsonschema pre-commit hook (#2480)
Browse files Browse the repository at this point in the history
* 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'.
  • Loading branch information
matthewfeickert committed May 23, 2024
1 parent b0efa64 commit 1ad59fc
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
24 changes: 9 additions & 15 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ on:
- minor
- major
release_candidate:
type: choice
description: 'Release candidate?'
options:
- false
- true
type: boolean
description: 'Release candidate'
default: false
new_version:
description: 'New version to bump to'
required: true
Expand All @@ -27,17 +25,13 @@ on:
required: true
type: string
force:
type: choice
description: 'Force override check?'
options:
- false
- true
type: boolean
description: 'Force override check'
default: false
dry_run:
type: choice
description: 'Perform a dry run to check?'
options:
- true
- false
type: boolean
description: 'Perform a dry run to check'
default: true

jobs:
bump-version:
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@ on:
workflow_dispatch:
inputs:
publish:
type: choice
description: 'Publish to TestPyPI?'
options:
- false
- true
type: boolean
description: 'Publish to TestPyPI'
default: false

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,11 @@ repos:
- id: codespell
files: ^.*\.(py|md|rst)$
args: ["-w", "-L", "hist,gaus"]

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.4
hooks:
- id: check-readthedocs
args: ["--verbose"]
- id: check-github-workflows
args: ["--verbose"]

0 comments on commit 1ad59fc

Please sign in to comment.