Initial AI extproc extension server #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint Python Code | |
on: | |
pull_request: | |
paths: | |
- '**/*.py' # Only trigger on changes to Python files | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: Install ruff | |
run: | | |
python -m pip install --upgrade pip | |
pip install ruff==0.9.0 | |
- name: Run ruff linter | |
# User GitHub-friendly output format | |
# Ignore generated files | |
run: ruff check . --output-format=github --exclude '**/*_pb2.py' --exclude '**/*_pb2.pyi' --exclude '**/*_pb2_*.py' | |
- name: Run ruff format check | |
run: | | |
if ! ruff format --diff . --exclude '**/*_pb2.py' --exclude '**/*_pb2.pyi' --exclude '**/*_pb2_*.py'; then | |
echo "Ruff formatting issues detected. Please run 'ruff format . --exclude '**/*_pb2.py' --exclude '**/*_pb2.pyi' --exclude '**/*_pb2_*.py'' locally to fix formatting issues." | |
exit 1 | |
fi |