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 1, 2025
1 parent 2bc2d2e commit c16f76f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 19 deletions.
25 changes: 7 additions & 18 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,14 @@ on:
branches: [main, develop]

jobs:
ruff-lint-format:
ruff-action-lint-format:
runs-on: ubuntu-latest
steps:
- name: Checkout python script
uses: actions/checkout@v4
with:
sparse-checkout: |
utils/generate_from_templates.py
- name: Set up Python
uses: actions/setup-python@v5
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 .
- name: Setup Ruff
uses: astral-sh/ruff-action@v3
- name: Run ruff linter
run: ruff check --output-format=github
- name: Run ruff formatter
run: ruff format --diff
2 changes: 1 addition & 1 deletion utils/generate_from_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,5 @@ def render_template(template_name: str, output_path: str, **context):
"syntaxes/mf6.tmLanguage.json",
blocks=blocks,
keywords=keywords,
valids=valids,
valids=valids
)

0 comments on commit c16f76f

Please sign in to comment.