Files
milvus-io--milvus/.github/workflows/python-lint.yaml
T
wehub-resource-sync 498b235461
Build and test / Build and test AMD64 Ubuntu 22.04 (push) Failing after 0s
Publish Builder / amazonlinux2023 (push) Failing after 1s
Build and test / UT for Cpp (push) Waiting to run
Build and test / UT for Go (push) Has been skipped
Publish KRTE Images / KRTE (push) Failing after 1s
Build and test / Integration Test (push) Has been skipped
Build and test / Upload Code Coverage (push) Has been skipped
Publish Builder / rockylinux9 (push) Failing after 1s
Publish Builder / ubuntu22.04 (push) Failing after 0s
Publish Builder / ubuntu24.04 (push) Failing after 0s
Publish Gpu Builder / publish-gpu-builder (push) Failing after 1s
Publish Test Images / PyTest (push) Failing after 0s
chore: import upstream snapshot with attribution
2026-07-13 12:31:17 +08:00

61 lines
1.7 KiB
YAML

name: Python Lint (tests/)
on:
push:
branches:
- master
paths:
- 'tests/**/*.py'
- 'tests/ruff.toml'
- '.github/workflows/python-lint.yaml'
pull_request:
paths:
- 'tests/**/*.py'
- 'tests/ruff.toml'
- '.github/workflows/python-lint.yaml'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
ruff:
name: Ruff (changed files only)
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Detect changed Python files under tests/
id: changed
uses: tj-actions/changed-files@v46
with:
files: tests/**/*.py
- name: ruff check
if: steps.changed.outputs.any_changed == 'true'
uses: astral-sh/ruff-action@v4.0.0
with:
version: "0.15.11"
src: ${{ steps.changed.outputs.all_changed_files }}
- name: ruff format --check
if: steps.changed.outputs.any_changed == 'true'
uses: astral-sh/ruff-action@v4.0.0
with:
version: "0.15.11"
src: ${{ steps.changed.outputs.all_changed_files }}
args: "format --check --diff"
- name: Validate ruff configuration (smoke test)
# Always runs so config-only PRs still catch a broken ruff.toml.
# --exit-zero ignores existing baseline violations; only fails when
# ruff cannot load the config at all.
uses: astral-sh/ruff-action@v4.0.0
with:
version: "0.15.11"
src: "tests/scripts"
args: "check --exit-zero"