TEST: with and without target version #88
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Linter | |
on: push | |
permissions: | |
contents: read | |
jobs: | |
python: | |
name: Python | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-20.04 | |
- ubuntu-22.04 | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Setup Python virtualenv | |
run: | | |
python3 -m venv .venv | |
.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 --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 --target-version "$PYVER" --exit-zero --select ALL vault_oidc_ssh_cert_action.py | |
env: | |
PYVER: ${{ steps.detect.outputs.pyver }} | |
- name: Check ruff linting any version | |
run: .venv/bin/ruff check --exit-zero --select ALL 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 | |
super: | |
name: Super-Linter | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
statuses: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Lint | |
uses: super-linter/super-linter/slim@v6 | |
env: | |
VALIDATE_ALL_CODEBASE: true | |
VALIDATE_PYTHON_BLACK: false | |
VALIDATE_PYTHON_FLAKE8: false | |
VALIDATE_PYTHON_ISORT: false | |
VALIDATE_PYTHON_MYPY: false | |
VALIDATE_PYTHON_PYLINT: false | |
DEFAULT_BRANCH: main | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |