forked from abelcheung/types-lxml
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (55 loc) · 1.46 KB
/
Copy pathpr.yml
File metadata and controls
62 lines (55 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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@v6
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