Skip to content

ci: consolidate lint and dependency audit jobs - #5301

Open
mnriem wants to merge 3 commits into
github:mainfrom
mnriem:mnriem-ci-job-consolidation
Open

mnriem wants to merge 3 commits into
github:mainfrom
mnriem:mnriem-ci-job-consolidation

Conversation

@mnriem

@mnriem mnriem commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

Description

Combine Ruff, Markdown lint, ShellCheck, and the committed dependency audit into one Ubuntu job with shared checkout, Python, and uv setup. This removes three jobs from each push and pull request without removing checks.

Keep checks in separately named steps so independent checks still run after another check fails, while preserving the job's failure status. Preserve full Git history for dependency comparisons and handle whitespace checks on manual runs.

Leave the pytest matrix, scheduled dependency-audit matrix, CodeQL jobs, and extension version guard unchanged. Update contributor guidance and workflow tests for the consolidated job.

Testing

Set up this checkout's .venv and editable install using the local development guide. Run commands from the checkout root.

  • Tested locally with .venv/bin/specify --help (Windows PowerShell: .\.venv\Scripts\specify.exe --help)
  • Ran relevant existing tests with .venv/bin/python -m pytest tests -q (Windows PowerShell: .\.venv\Scripts\python.exe -m pytest tests -q); use affected test paths for focused checks and LC_ALL=en_US.UTF-8 on macOS
  • Tested with a sample project (if applicable)

Commands and results:

  • .venv/bin/specify --help — passed.
  • LC_ALL=en_US.UTF-8 .venv/bin/python -m pytest tests/test_security_workflow.py tests/test_github_workflows.py -q — passed, 198 tests.
  • uvx [email protected] check tests/test_security_workflow.py tests/test_github_workflows.py — passed.
  • git diff --check — passed.

A sample project is not applicable to this CI-only behavior change. The full pytest suite and the consolidated job on GitHub Actions were not run locally; combined-job runtime has not been measured.

AI Disclosure

  • I did not use AI assistance for this contribution
  • I did use AI assistance (fill in the disclosure below)

AI disclosure: GitHub Copilot using GPT-6.1 Sol (model ID: gpt-6.1-sol), autonomous execution within user-directed scope; reasoning-effort setting was not exposed. The agent investigated workflow timings, authored the workflow, test, and contributor-documentation changes, ran local checks, and prepared the commit and pull request.

Share checkout and tool setup across Ruff, Markdown lint, ShellCheck, and the committed dependency audit while preserving independent failure reporting and the scheduled audit matrix.

Assisted-by: GitHub Copilot (model: GPT-6.1 Sol, autonomous)
Co-authored-by: Copilot App <[email protected]>
Copilot AI auto review requested due to automatic review settings November 6, 2026 19:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The whitespace check silently skips changes when manually dispatched on a merge commit, allowing introduced trailing whitespace to pass undetected.

1 open issue
What changed in this PR

Consolidates Spec Kit’s lint and committed dependency-audit checks into one Ubuntu job, reducing repeated setup while retaining separate check steps.

Changes:

  • Shares checkout, Python, and uv setup, with conditions that let independent checks continue after failures.
  • Preserves full Git history and adds whitespace checking for manual runs.
  • Updates contributor guidance and workflow tests while preserving the pytest and scheduled audit matrices.
File Description
tests/​test_security_workflow.py Tests consolidated checks, prerequisites, and audit configuration.
tests/​test_github_workflows.py Updates job lookup and adds whitespace-check cases.
CONTRIBUTING.md Documents the combined job and independent checks.
.github/​workflows/​test.yml Removes the Ruff job; retains pytest.
.github/​workflows/​security.yml Removes the workflow after relocating its audit jobs.
.github/​workflows/​lint.yml Combines lint and audit checks and hosts the scheduled audit matrix.

Review effort: Balanced (auto)

Comment thread .github/workflows/lint.yml Resolved
@mnriem mnriem added the triage-nice-to-have Verdict: evidence-backed fix or greenlit feature — land after review label Nov 6, 2026
Use first-parent merge diffs while retaining root-commit handling. Cover clean and whitespace-breaking manual runs against root and merge commits.

Assisted-by: GitHub Copilot (model: GPT-6.1 Sol, autonomous)
Co-authored-by: Copilot App <[email protected]>
Copilot AI auto review requested due to automatic review settings November 6, 2026 20:53
@mnriem

mnriem commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator Author

Fixed in 5bb6002: manually dispatched whitespace checks now use first-parent merge diffs while retaining root-commit handling. Added clean and trailing-whitespace cases for manual runs on merge and root commits; the merge regression failed before the fix and passes afterward. All 202 targeted workflow tests pass. Posted on behalf of @mnriem by GitHub Copilot using GPT-6.1 Sol (gpt-6.1-sol), autonomous execution within user-directed scope; reasoning-effort setting was not exposed. AI assistance covered the workflow fix, regression tests, local validation, and this summary.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No outstanding review findings block the consolidation of lint and dependency-audit checks.

No open issues 🎉

1 resolved since last review

Review effort: Balanced (auto)

Preserve upstream's routine and scheduled/manual Python matrices and setup-uv v10.3.3 pins while retaining the consolidated lint and dependency audit job.

Assisted-by: GitHub Copilot (model: GPT-6.1 Sol, autonomous)
Co-authored-by: Copilot App <[email protected]>
Copilot AI auto review requested due to automatic review settings November 6, 2026 21:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Markdownlint can execute repository-provided JavaScript before both dependency audits in the same workspace, allowing audited files to be altered so successful results may not reflect committed requirements.

1 open issue

Review effort: Balanced (auto)

Comment on lines 119 to 121
- name: Run markdownlint-cli2
if: ${{ !cancelled() && steps.checkout.outcome == 'success' && steps.documentation-globs.outcome == 'success' }}
uses: DavidAnson/markdownlint-cli2-action@696eb3f2509270d7b882d2aa68347bc676e7af34 # v25.0.0

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage-nice-to-have Verdict: evidence-backed fix or greenlit feature — land after review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants