Skip to content

add ruff to actions dependencies #2

add ruff to actions dependencies

add ruff to actions dependencies #2

Workflow file for this run

name: Ruff
on:
push:
paths:
- '**.py' # Run if pushed commits include a change to any Python (.py) file.
- '.github/workflows/lint-python.yml' # Run if pushed commits include a change to this workflow file.
- 'pyproject.toml' # Run if project configuration file changes.
pull_request:
paths:
- '**.py' # Run if pushed commits include a change to any Python (.py) file.
- '.github/workflows/lint-python.yml' # Run if pushed commits include a change to this workflow file.
- 'pyproject.toml' # Run if project configuration file changes.
workflow_dispatch:
jobs:
ruff:
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: ["3.12", "3.11", "3.10", "3.9"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip3 install -U pip
pip3 install .[github-actions]
- name: Linting the code with ruff
run: |
ruff check $(git ls-files '*.py') --diff | ydiff -s