Skip to content

Commit 8a18101

Browse files
PR review: Add PR review comments for mypy and pylint warnings
Signed-off-by: Bernhard Kaindl <[email protected]>
1 parent 59b499a commit 8a18101

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#
2+
# The reviewdog workflow steps use reporter: github-pr-review,
3+
# which submits mypy and pylint warnings using review comment
4+
# on the pull request. It needs write permissions for the pull request
5+
# to post the comments and can only be used in the context of a pull request.
6+
#
7+
name: mypy and pylint PR review comments
8+
9+
on: pull_request
10+
11+
concurrency: # On new workflow, cancel old workflows from the same PR, branch or tag:
12+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
13+
cancel-in-progress: true
14+
15+
permissions:
16+
contents: read
17+
pull-requests: write
18+
19+
jobs:
20+
reviewdog:
21+
runs-on: ubuntu-24.04
22+
steps:
23+
- uses: actions/checkout@v4
24+
- uses: actions/setup-python@v5
25+
with:
26+
python-version: 3.13
27+
28+
- name: Install uv and activate the environment
29+
uses: astral-sh/setup-uv@v6
30+
with:
31+
activate-environment: true
32+
33+
- run: uv pip install pylint types-setuptools -r pyproject.toml --extra mypy
34+
35+
- uses: tsuyoshicho/action-mypy@v4
36+
name: Run mypy with reviewdog to submit GitHub checks for warnings
37+
with:
38+
install_types: false
39+
reporter: github-pr-review
40+
level: warning
41+
42+
- uses: dciborow/[email protected]
43+
name: Run pylint with reviewdog to submit GitHub checks for warnings
44+
with:
45+
reporter: github-pr-review
46+
glob_pattern: "xcp tests"

0 commit comments

Comments
 (0)