Skip to content

Commit

Permalink
Add ruff --target-version to linter workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaso committed May 12, 2024
1 parent 19ccb0a commit 0e6574d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/linter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,19 @@ jobs:
.venv/bin/pip install --upgrade pip setuptools
.venv/bin/pip install ruff mypy types-requests
- name: Detect Python version
id: detect
run: echo "pyver=$(python3 -c 'import sys; print(f"py{sys.version_info.major}{sys.version_info.minor}")')" >> "$GITHUB_OUTPUT"

- name: Check ruff formating
run: .venv/bin/ruff format --diff vault_oidc_ssh_cert_action.py
run: .venv/bin/ruff format --target-version "$PYVER" --diff vault_oidc_ssh_cert_action.py
env:
PYVER: ${{ steps.detect.outputs.pyver }}

- name: Check ruff linting
run: .venv/bin/ruff check vault_oidc_ssh_cert_action.py
run: .venv/bin/ruff check --target-version "$PYVER" vault_oidc_ssh_cert_action.py
env:
PYVER: ${{ steps.detect.outputs.pyver }}

- name: Check type hints
run: .venv/bin/mypy --strict vault_oidc_ssh_cert_action.py
Expand Down

0 comments on commit 0e6574d

Please sign in to comment.