ZZhenyu2Liangadd ruff actions
ca195796Add on Aug 31History
name: Ruff

on:
  push:
  pull_request:

permissions:
  contents: read

jobs:
  ruff:
    name: Lint and format
    runs-on: ubuntu-latest

    steps:
      - name: Check out repository
        uses: actions/checkout@v6

      - name: Set up Python
        uses: actions/setup-python@v6
        with:
          python-version: "3.12"

      - name: Install Ruff
        run: python -m pip install --disable-pip-version-check ruff==0.14.10

      - name: Run Ruff lint checks
        run: ruff check .

      - name: Check Ruff formatting
        run: ruff format --check .