Skip to content

Commit

Permalink
add ruff to Django Check (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
rm03 authored Feb 18, 2024
1 parent 7b67c73 commit 820cdfd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions django-check/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ inputs:
required: False
description: "whether to use black for linting"
default: "true"
ruff:
required: False
description: "whether to use ruff for linting"
default: "false"
# Dependency manager config
dependencyManager:
required: False
Expand Down Expand Up @@ -73,5 +77,11 @@ runs:
cd ${{ inputs.path }}
${{ inputs.dependencyManager }} run black --check . || ${{ inputs.dependencyManager }} run black --diff .
if: ${{ inputs.black }}
- name: Lint (ruff)
shell: bash
run: |-
cd ${{ inputs.path }}
${{ inputs.dependencyManager }} run ruff check . && (${{ inputs.dependencyManager }} run ruff format --check . || ${{ inputs.dependencyManager }} run ruff format --diff .
if: ${{ inputs.ruff }}
container:
image: python:${{ inputs.pythonVersion }}

0 comments on commit 820cdfd

Please sign in to comment.