Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 8 additions & 17 deletions .github/workflows/validate-python.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Python Formatting Validation
name: Python Lint & Format

on:
workflow_dispatch:
Expand All @@ -9,35 +9,26 @@ on:
- ".pre-commit-config.yaml"
- "Makefile"
- "pyproject.toml"
- ".github/workflow/validate-python.yml"
pull_request_target:
types: [closed]
paths:
- "**/*.py"
- ".pre-commit-config.yaml"
- "Makefile"
- "pyproject.toml"
- ".github/workflow/validate-python.yml"
- ".github/workflows/validate-python.yml"

jobs:
formatting-test:
lint-and-format:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read

steps:
- uses: actions/checkout@v6
with:
# For pull_request_target on forks, ensure we check out the merge commit or default branch safely
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- uses: actions/setup-python@v6
with:
python-version: "3.12"

- name: Install python formatting test dependencies
- name: Install ruff
run: pip install ruff

- name: Run Formatting Tests
- name: Run ruff linter
run: ruff check kubeflow-pipelines/

- name: Run ruff format check
run: make format-python-check
Loading