Files
crewAI/.github/workflows/linter.yml
Cursor Agent 2a32d58fc9 ci: stop Run Tests from starting on docs-only PRs
Docs/markdown/Actions-only PRs still started the Run Tests workflow so
branch-protection stubs could report required check names. The pytest
matrix was already skipped, but the workflow still appeared and burned
runners for Detect changes + skip jobs.

- Add paths-ignore on tests, lint, and type-checker so those workflows
  do not start when only docs/**, *.md, *.mdx, or .github/** change
- Add non-code-ci-status.yml to create the required check runs
  (lint, type-checker, tests, tests 3.10–3.13) via the Checks API
- Drop in-workflow dorny skip scaffolding from the Python CI workflows
- Exclude *.mdx in the vulnerability-scan path filter for consistency

Co-authored-by: Rip&Tear <theCyberTech@users.noreply.github.com>
2026-08-12 06:59:03 +00:00

76 lines
2.0 KiB
YAML

name: Lint
on:
pull_request:
# Do not start this workflow for docs/markdown/Actions-only PRs.
# Required check name `lint` for those PRs is reported by
# non-code-ci-status.yml so branch protection does not hang.
paths-ignore:
- 'docs/**'
- '**/*.md'
- '**/*.mdx'
- '.github/**'
permissions:
contents: read
jobs:
lint-run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Restore global uv cache
id: cache-restore
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: |
~/.cache/uv
~/.local/share/uv
.venv
key: uv-main-py3.11-${{ hashFiles('uv.lock') }}
restore-keys: |
uv-main-py3.11-
- name: Install uv
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
with:
version: "0.11.3"
python-version: "3.11"
enable-cache: false
- name: Install dependencies
run: uv sync --all-groups --all-extras --no-install-project
- name: Ruff check
run: uv run ruff check lib/
- name: Ruff format
run: uv run ruff format --check lib/
- name: Save uv caches
if: steps.cache-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: |
~/.cache/uv
~/.local/share/uv
.venv
key: uv-main-py3.11-${{ hashFiles('uv.lock') }}
# Summary job to provide single status for branch protection
lint:
name: lint
runs-on: ubuntu-latest
needs: [lint-run]
if: always()
steps:
- name: Check results
run: |
if [ "${{ needs.lint-run.result }}" == "success" ]; then
echo "Lint passed"
else
echo "Lint failed"
exit 1
fi