Skip to content

Add mypy.stubtest

Add mypy.stubtest #73

Workflow file for this run

name: PR review
on:
pull_request_target:
paths-ignore:
- '**/dependabot.yml'
- '.editorconfig'
- '**/.gitignore'
- '**/.gitattributes'
- '**.md'
- 'LICENSE'
jobs:
review:
runs-on: ubuntu-24.04
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: astral-sh/setup-uv@v5
with:
version: '0.6.2'
enable-cache: true
cache-dependency-glob: |
./pyproject.toml
- name: Install prerequisites
run: |
uv python install 3.10
uv venv --python-preference only-managed
uv pip install -r pyproject.toml
uv pip install 'mypy == 1.11.2'
- name: Mypy review
id: mypy
uses: tsuyoshicho/action-mypy@v5
with:
reporter: github-pr-review
level: warning
target: src/lxml-stubs
fail_on_error: true
setup_method: nothing
install_types: false
output_json: true
execute_command: .venv/bin/mypy
# Action doesn't support --pythonpath, smuggle it
# through misc flags
- name: Pyright review
id: pyright
if: success() || steps.mypy.conclusion == 'failure'
uses: jordemort/action-pyright@v1
with:
reporter: github-pr-review
level: warning
fail_on_error: true
pyright_flags: --pythonpath .venv/bin/python3 src