-
Notifications
You must be signed in to change notification settings - Fork 17
63 lines (52 loc) · 1.89 KB
/
reviewdog-review.yml
File metadata and controls
63 lines (52 loc) · 1.89 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
62
63
#
# The reviewdog workflow steps use reporter: github-pr-review,
# which submits mypy and pylint warnings using review comment
# on the pull request. It needs write permissions for the pull request
# to post the comments and can only be used in the context of a pull request.
#
name: mypy, pylint and coverage PR review comments
on:
workflow_run:
workflows: ["Unit tests"]
types: [completed]
concurrency: # On new workflow, cancel old workflows from the same PR, branch or tag:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
jobs:
mypy-pylint-coverage-PR-comments:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install uv and activate the environment
uses: astral-sh/setup-uv@v6
with:
activate-environment: true
- run: uv pip install pylint tox types-setuptools -r pyproject.toml --extra mypy
- uses: tsuyoshicho/action-mypy@v4
name: Run mypy with reviewdog to submit GitHub checks for warnings
with:
install_types: false
reporter: github-pr-review
level: warning
- uses: dciborow/action-pylint@0.1.0
name: Run pylint with reviewdog to submit GitHub checks for warnings
with:
reporter: github-pr-review
glob_pattern: "xcp tests"
- name: Run tox to run pytest in the defined tox environments
run: tox -e py311-covcp
continue-on-error: true
env:
DIFF_COVERAGE_MIN: 0 # reviewdog-action-code-coverage shows coverage
- uses: aki77/reviewdog-action-code-coverage@v2
with:
lcov_path: coverage.lcov