Skip to content

ruff

ruff #56

Workflow file for this run

name: Lint
on:
push:
branches:
- '**' # matches every branch
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}-lint"
cancel-in-progress: true
defaults:
run:
shell: bash
permissions:
id-token: write
attestations: write
jobs:
changes:
runs-on: ubuntu-latest
timeout-minutes: 1
defaults:
run:
shell: bash
outputs:
lint: ${{steps.changes.outputs.lint }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- id: changes
name: Check for file changes
uses: dorny/paths-filter@v3
with:
base: ${{ github.ref }}
token: ${{ github.token }}
filters: .github/file-filters.yml
lint:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
needs: [ changes ]
if: needs.changes.outputs.lint
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
architecture: 'x64'
- uses: yezz123/setup-uv@v4
with:
version: "latest"
- name: lint
if: needs.changes.outputs.lint
run: |
pip install ruff
ruff check -e
ruff format --check