The lint-python job in check_python.yml only ran `ruff check` (lint) but never verified formatting with `ruff format --check`. This allowed unformatted Python code to pass CI and be merged. Add the missing format check step.
47 lines
977 B
YAML
47 lines
977 B
YAML
name: Check Python
|
|
on: [pull_request]
|
|
|
|
jobs:
|
|
test-python:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: ./python/x402
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v5
|
|
with:
|
|
enable-cache: true
|
|
cache-dependency-glob: "python/x402/uv.lock"
|
|
|
|
- name: Set up Python
|
|
run: uv python install
|
|
|
|
- name: Install dependencies
|
|
run: uv sync --all-extras --dev
|
|
|
|
- name: Run Tests
|
|
run: uv run pytest
|
|
|
|
lint-python:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: ./python/x402
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v5
|
|
with:
|
|
enable-cache: true
|
|
cache-dependency-glob: "python/x402/uv.lock"
|
|
|
|
- name: Lint
|
|
run: uvx ruff check
|
|
|
|
- name: Check formatting
|
|
run: uvx ruff format --check
|