ci: add pyright workflow (#1232)

* ci: initial version of pyright workflow

* ci: remove invalid pyright settings

* debug: return ALL results from pyright

* ci: remove unnecessary reviewdog install

* Revert "debug: return ALL results from pyright"

This reverts commit 471e39d29f.

* ci: choose reporter based on event type

* ci: choose correct reporter for non-pr event

* ci: small cleanup

* ci: also install pytest deps

* doc: add license info for new workflow

* chore: bump pyright patch version

Co-authored-by: Travis Abendshien <46939827+CyanVoxel@users.noreply.github.com>

* fix: add back settings for basedpyright

---------

Co-authored-by: Travis Abendshien <46939827+CyanVoxel@users.noreply.github.com>
This commit is contained in:
Jann Stute
2026-05-14 10:45:52 +02:00
committed by GitHub
parent 3846b65758
commit 2ab8203967
2 changed files with 34 additions and 1 deletions

31
.github/workflows/pyright.yaml vendored Normal file
View File

@@ -0,0 +1,31 @@
# SPDX-FileCopyrightText: (c) TagStudio Contributors
# SPDX-License-Identifier: GPL-3.0-only
---
name: Pyright
on: [push, pull_request]
jobs:
pyright:
name: Run Pyright
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- name: Install Python dependencies
run: |
python -m pip install --upgrade uv
uv pip install --system .[pyright,pytest]
- name: Execute Pyright
uses: jordemort/action-pyright@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: ${{ github.event_name == 'pull_request' && 'github-pr-review' || 'github-check' }}