feat(ci): add Python lint job with ruff#30
Merged
Conversation
Adds an unconditional lint job that runs ruff check and ruff format on every PR and push. Both steps are advisory (continue-on-error) until pre-existing issues are resolved. The build job now depends on lint (needs: [lint]), matching the hriv pattern where build jobs gate on quality checks. This also fixes the release-please required checks issue: the lint job always runs and reports a status, unlike build-qcon-api which skips via change detection on metadata-only PRs. Co-Authored-By: kyle_hunter@bcit.ca <kyle_hunter@bcit.ca>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an unconditional
lintjob to CI that runsruff checkandruff format --checkon every PR and push. This matches hriv's pattern where quality-gate jobs (backend-tests, frontend-checks) always run and the build jobs depend on them.Why: The
build-qcon-api / buildjob uses the reusableoci-build.yamlworkflow which has change detection — it skips when only metadata files change (e.g. release-please PRs). Whenbuild-qcon-api / buildis a required check, skipped runs leave the status as "Waiting for status to be reported", blocking merge. Thelintjob always runs and always reports a status.Changes:
lintjob: installs Python 3.11 + ruff, runsruff check .andruff format --check .continue-on-error: true(advisory) since the codebase hasn't been linted beforebuild-qcon-apinow hasneeds: [lint]so builds gate on lint passingAfter merging: Update branch protection to require
lintinstead of (or in addition to)build-qcon-api / build. This ensures release-please PRs can merge without bypassing checks.Review & Testing Checklist for Human
Risk: 🟡 Medium (CI workflow change)
lintjob appears and passes (with advisory warnings) in this PR's CIlintas required, optionally removebuild-qcon-api / buildNotes
ruffruns with default config (nopyproject.tomlconfig). Once pre-existing issues are triaged, removecontinue-on-error: trueand optionally add a[tool.ruff]section topyproject.tomlfor rule customization.Link to Devin session: https://app.devin.ai/sessions/c8038ad2684a4fd786c6aa2a07ce9425
Requested by: @kphunter