Skip to content

Chore: Restore release workflow #114

Chore: Restore release workflow

Chore: Restore release workflow #114

Workflow file for this run

---
name: "⛔️ Standalone linting checks"
# yamllint disable-line rule:truthy
on:
workflow_dispatch:
pull_request:
types: [opened, reopened, edited, synchronize]
branches:
- "*"
- "!update-devops-tooling"
jobs:
linting:
name: "Unsupported by pre-commit.ci"
runs-on: "ubuntu-latest"
# Don't run when pull request is merged
if: github.event.pull_request.merged == false
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: "Checkout repository"
uses: actions/checkout@v4
- name: "Install linting tools"
run: |
pip install --upgrade pip
pip install pre-commit mypy
- name: "Run mypy using pre-commit"
run: pre-commit run mypy -a
# yamllint disable rule:line-length
# yamllint disable rule:comments-indentation
# yamllint disable rule:comments
# Provided below as an example, in case needed in future
# - name: "Install dependencies"
# run: |
# SOURCE=".pre-commit-config.yaml"
# echo "Install Python dependencies from: $SOURCE"
# echo "With: pip install $PKGS"
# PKGS=$(yq '.repos[] | select (.repo == "https://github.com/pre-commit/mirrors-mypy")' .pre-commit-config.yaml | \
# grep additional_dependencies | \
# awk -F: '{print $2}' | \
# sed "s/\[//g" | \
# sed "s/\]//g" | \
# sed "s/,//g" | \
# sed 's/"//g')
# pip install $PKGS