Skip to content

Commit

Permalink
Change: Support different Python linter
Browse files Browse the repository at this point in the history
Allow to run tests with ruff at the end.
  • Loading branch information
bjoernricks committed Jul 4, 2023
1 parent 3eb7658 commit 14f0af1
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lint-python/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ inputs:
working-directory:
description: "Working directory where to run the action"
default: ${{ github.workspace }}
linter:
description: "Linter to use. Default is 'pylint'."
default: "pylint"

branding:
icon: "package"
Expand All @@ -46,15 +49,11 @@ runs:
cache-poetry-installation: ${{ inputs.cache-poetry-installation }}
install-dependencies: ${{ inputs.install-dependencies }}
working-directory: ${{ inputs.working-directory }}
- run: echo "Running black"
shell: bash
- run: poetry run black --check --diff ${{ inputs.packages }}
shell: bash
name: Check with black
working-directory: ${{ inputs.working-directory }}
- run: echo "Running pylint"
shell: bash
- run: poetry run pylint ${{ inputs.packages }}
- run: poetry run ${{ inputs.linter }} ${{ inputs.packages }}
shell: bash
name: Check with pylint
name: Check with ${{ inputs.linter }}
working-directory: ${{ inputs.working-directory }}

0 comments on commit 14f0af1

Please sign in to comment.