Skip to content

ci: include scripts folder to lint ci #1489

ci: include scripts folder to lint ci

ci: include scripts folder to lint ci #1489

Workflow file for this run

name: Lint Python code with Ruff & mypy
on:
push:
branches:
- main
paths:
- "**.py"
- "pyproject.toml"
pull_request:
paths:
- "**.py"
- "pyproject.toml"
workflow_dispatch:
permissions:
contents: read
env:
VAPOURSYNTH_VERSION: 72
PYTHON_VERSION: 3.14
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ env.PYTHON_VERSION }}
enable-cache: true
- name: Set up VapourSynth ${{ env.VAPOURSYNTH_VERSION }}
uses: Jaded-Encoding-Thaumaturgy/setup-vapoursynth@v1
with:
vapoursynth-version: ${{ env.VAPOURSYNTH_VERSION }}
- name: Install dependencies
run: uv sync --locked
- name: Run Ruff check
id: ruff_check
run: uv run ruff check .
- name: Run Ruff format
id: ruff_format
if: success() || (failure() && steps.ruff_check.conclusion == 'failure')
run: uv run ruff format --check --diff
- name: Running mypy
if: success() || (failure() && (steps.ruff_check.conclusion == 'failure' || steps.ruff_format.conclusion == 'failure'))
run: uv run mypy .
- name: Post webhook for failure
if: failure()
uses: Jaded-Encoding-Thaumaturgy/discord-failure-notifier@v1
with:
webhook-url: ${{ secrets.WEBHOOK_URL }}