Skip to content

Merge pull request #53 from szaher/ray-data-rag #243

Merge pull request #53 from szaher/ray-data-rag

Merge pull request #53 from szaher/ray-data-rag #243

Workflow file for this run

---
name: Python Lint
on:
pull_request:
paths:
- '**/*.py'
- 'pyproject.toml'
- 'uv.lock'
- '.github/workflows/python-lint.yml'
- '.github/actions/setup-python-ci/**'
- '.github/scripts/check_imports/**'
push:
jobs:
python-lint:
name: python-lint
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
steps:
- name: Check out repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Setup Python & deps
uses: ./.github/actions/setup-python-ci
with:
python-version: "3.11"
extra: lint
- name: Check uv.lock is in sync
run: uv lock --check
- name: Determine changed Python files
id: changed-python
uses: ./.github/actions/detect-changed-assets
with:
filter: '\.py$'
skip-deleted-files: true
- name: Run ruff format check (changed files)
if: steps.changed-python.outputs.filtered-changed-files != ''
env:
CHANGED_FILES: ${{ steps.changed-python.outputs.filtered-changed-files }}
run: |
uv run ruff format --force-exclude --check $CHANGED_FILES
- name: Run ruff lint (changed files)
if: steps.changed-python.outputs.filtered-changed-files != ''
env:
CHANGED_FILES: ${{ steps.changed-python.outputs.filtered-changed-files }}
run: |
uv run ruff check --force-exclude $CHANGED_FILES
- name: Determine changed components/pipelines Python files
id: changed-components-pipelines
uses: ./.github/actions/detect-changed-assets
with:
filter: '^(components|pipelines)/.*\.py$'
- name: Run custom import guard
if: steps.changed-components-pipelines.outputs.filtered-changed-files != ''
env:
CHANGED_FILES: ${{ steps.changed-components-pipelines.outputs.filtered-changed-files }}
run: |
uv run python .github/scripts/check_imports/check_imports.py \
--config .github/scripts/check_imports/import_exceptions.yaml \
-- $CHANGED_FILES