Skip to content

馃懛 Bump astral-sh/setup-uv from 9.0.0 to 10.0.1 (#1437) #896

馃懛 Bump astral-sh/setup-uv from 9.0.0 to 10.0.1 (#1437)

馃懛 Bump astral-sh/setup-uv from 9.0.0 to 10.0.1 (#1437) #896

Workflow file for this run

name: Ruff
on:
push:
branches: [main]
paths-ignore:
- "**.md"
- "**.ipynb"
- "**.cff"
- "docs/**"
- "demo/**"
pull_request:
branches: [main]
paths-ignore:
- "**.md"
- "**.ipynb"
- "**.cff"
- "docs/**"
- "demo/**"
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.10"
- name: Install uv
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
- name: Install dependencies
run: |
uv venv --python 3.10
uv sync --group dev
- name: Check code formatting
id: ruff_check
run: |
source .venv/bin/activate
python scripts/format_code.py check
continue-on-error: true
- name: Provide formatting guidance
if: steps.ruff_check.outcome == 'failure'
run: |
echo "::error::Code formatting check failed! 馃毃"
echo ""
echo "::warning::To fix formatting issues, please run the following commands locally:"
echo ""
echo "1. Ensure you have the development environment set up:"
echo " pip install uv"
echo " uv venv --python 3.10"
echo " source .venv/bin/activate # On Windows: .venv\Scripts\activate"
echo " uv sync --extra dev"
echo ""
echo "2. Fix the formatting issues:"
echo " python scripts/format_code.py fix"
echo ""
echo "3. Commit and push the changes:"
echo " git add ."
echo " git commit -m 'Fix code formatting'"
echo " git push"
echo ""
echo "For more details, see CONTRIBUTING.md"
exit 1