Skip to content

Commit

Permalink
Simplify ruff workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
martclanor committed Feb 2, 2025
1 parent 2bc2d2e commit 4b201ba
Showing 1 changed file with 11 additions and 19 deletions.
30 changes: 11 additions & 19 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,22 @@ name: Ruff

on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
branches:
- main
- develop

jobs:
ruff-lint-format:
ruff-action:
runs-on: ubuntu-latest
steps:
- name: Checkout python script
- name: Checkout repository
uses: actions/checkout@v4
- name: Run ruff linter
uses: astral-sh/ruff-action@v3
with:
sparse-checkout: |
utils/generate_from_templates.py
- name: Set up Python
uses: actions/setup-python@v5
args: check --output-format=github
- name: Run ruff formatter
uses: astral-sh/ruff-action@v3
with:
python-version: "3.13"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff
- name: Run Ruff linter
run: |
ruff check --output-format=github .
- name: Run Ruff formatter
run: |
ruff format --diff .
args: format --diff

0 comments on commit 4b201ba

Please sign in to comment.