Skip to content

Commit 99b77d8

Browse files
PR review: Add PR review comments for mypy and pylint warnings
Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
1 parent 59b499a commit 99b77d8

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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:
10+
workflow_run:
11+
workflows: ["Unit tests"]
12+
types: [completed]
13+
14+
concurrency: # On new workflow, cancel old workflows from the same PR, branch or tag:
15+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
16+
cancel-in-progress: true
17+
18+
permissions:
19+
contents: read
20+
pull-requests: write
21+
22+
jobs:
23+
reviewdog:
24+
runs-on: ubuntu-24.04
25+
steps:
26+
- uses: actions/checkout@v4
27+
- uses: actions/setup-python@v5
28+
with:
29+
python-version: 3.13
30+
31+
- name: Install uv and activate the environment
32+
uses: astral-sh/setup-uv@v6
33+
with:
34+
activate-environment: true
35+
36+
- run: uv pip install pylint types-setuptools -r pyproject.toml --extra mypy
37+
38+
- uses: tsuyoshicho/action-mypy@v4
39+
name: Run mypy with reviewdog to submit GitHub checks for warnings
40+
with:
41+
install_types: false
42+
reporter: github-pr-review
43+
level: warning
44+
45+
- uses: dciborow/action-pylint@0.1.0
46+
name: Run pylint with reviewdog to submit GitHub checks for warnings
47+
with:
48+
reporter: github-pr-review
49+
glob_pattern: "xcp tests"

0 commit comments

Comments
 (0)