Skip to content

Python3 deploy action mypy to review this pr.new #10

Python3 deploy action mypy to review this pr.new

Python3 deploy action mypy to review this pr.new #10

name: Python Code Review
on: [pull_request]
# Cancel a currently running workflow from the same PR, branch or tag when
# a new workflow is triggered:
# https://stackoverflow.com/questions/66335225/how-to-cancel-previous-runs-in-the-pr-when-you-push-new-commitsupdate-the-curre
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
jobs:
python-code-review:
name: Python Code Review
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Needed to get the changed lines: origin/master..HEAD
- name: Setup Python 3.11
uses: LizardByte/setup-python-action@master
with:
python-version: 3.11
# uses: tsuyoshicho/[email protected]
- uses: bernhardkaindl/action-mypy@36cb3a857d01c1bdaa2811893106c71580132d71
with:
filter_mode: nofilter
setup_method: install
setup_command: pip install mypy mock
mypy_flags: |
--scripts-are-modules
--check-untyped-defs
--allow-redefinition
--ignore-missing-imports
--no-pretty
--warn-unreachable
--disable-error-code attr-defined
--exclude ocaml/
--exclude scripts/examples
--exclude scripts/examples/python/monitor-unwanted-domains.py
--exclude scripts/scalability-tests/ping-master.py
--exclude scripts/backup-sr-metadata.py
--exclude scripts/restore-sr-metadata.py
--exclude scripts/nbd_client_manager.py
target: |
scripts/perfmon
scripts/hfx_filename
scripts/host-display
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
- uses: dciborow/[email protected]
with:
filter_mode: nofilter
glob_pattern: "scripts/*"
github_token: ${{ secrets.github_token }}
reporter: github-pr-review