Skip to content

🧪Integrate jsonschema into pre-commit framework#2273

Merged
webknjaz merged 2 commits intojazzband:mainfrom
webknjaz:maintenance/pre-commit-jsonschema
Nov 15, 2025
Merged

🧪Integrate jsonschema into pre-commit framework#2273
webknjaz merged 2 commits intojazzband:mainfrom
webknjaz:maintenance/pre-commit-jsonschema

Conversation

@webknjaz
Copy link
Member

This plugs built-in checks for GitHub Actions and Workflows, and also enforces timeouts on each job definition. The patch skips checking the RTD config as the schema demands the build.tools mapping to be non- empty which conflicts with what we've got as we provision Python via uv ourselves.

Contributor checklist
  • Included tests for the changes.
  • A change note is created in changelog.d/ (see changelog.d/README.md for instructions) or the PR text says "no changelog needed".
Maintainer checklist
  • If no changelog is needed, apply the bot:chronographer:skip label.
  • Assign the PR to an existing or new milestone for the target version (following Semantic Versioning).

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR integrates jsonschema validation into the pre-commit framework to enforce best practices for GitHub Actions workflows, specifically ensuring all jobs define timeout limits.

  • Adds check-jsonschema pre-commit hooks for validating GitHub Actions and workflow files
  • Enforces timeout-minutes requirement on all workflow job definitions
  • Adds timeout values to all workflow jobs (2-9 minutes depending on job complexity)

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
.pre-commit-config.yaml Adds check-jsonschema hooks for GitHub Actions/workflows validation and timeout enforcement; comments out check-readthedocs due to schema conflict
.github/workflows/reusable-qa.yml Adds 2-minute timeout to the QA job with explanatory comment
.github/workflows/ci.yml Adds timeouts to test (7 min), pypy (9 min), coverage-summary (1 min), and check (1 min) jobs

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@webknjaz webknjaz marked this pull request as ready for review November 14, 2025 23:05
@webknjaz webknjaz enabled auto-merge November 15, 2025 01:55
Copy link
Member

@sirosen sirosen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been uncertain about whether or not that require-timeouts schema really belongs in check-jsonschema -- I added it pretty early in the project and haven't felt sure about it. So I'm glad to see it here, it's signal that it's really useful, and not just to me!

I've started looking into the readthedocs schema issue a little, but I'll probably need to file an issue over there and ask some questions.

Anyway, none of that blocks this update!

@webknjaz webknjaz added this pull request to the merge queue Nov 15, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 15, 2025
@webknjaz
Copy link
Member Author

Yep, I actually integrate it everywhere.

@webknjaz webknjaz added this pull request to the merge queue Nov 15, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 15, 2025
This plugs built-in checks for GitHub Actions and Workflows, and also
enforces timeouts on each job definition. The patch skips checking the
RTD config as the schema demands the `build.tools` mapping to be non-
empty which conflicts with what we've got as we provision Python via
`uv` ourselves.
@webknjaz webknjaz force-pushed the maintenance/pre-commit-jsonschema branch from aaf24ee to 7f4ac74 Compare November 15, 2025 17:02
@webknjaz webknjaz enabled auto-merge November 15, 2025 17:02
@webknjaz webknjaz added this pull request to the merge queue Nov 15, 2025
Merged via the queue into jazzband:main with commit d367d9f Nov 15, 2025
52 checks passed
webknjaz added a commit to webknjaz/pip-tools that referenced this pull request Nov 28, 2025
github-merge-queue bot pushed a commit that referenced this pull request Nov 28, 2025
…yntax-fix

📝 Fix MyST role syntax in PR #2273 change note
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments