Skip to content

Replace Super-Linter #102

Replace Super-Linter

Replace Super-Linter #102

Workflow file for this run

---
name: Linter
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
jobs:
python:
name: Python
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.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" 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
secondary:
name: Secondary linting
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Secondary Linters
uses: andreaso/setup-secondary-linters@main
- name: Lint GitHub Actions workflows
run: actionlint
- name: Markdown lint README
run: markdownlint README.md