Python3 deploy action mypy to review this pr.new #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: file | |
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 | |
--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 | |
--config-file .mypy.ini | |
target: | | |
scripts/perfmon | |
scripts/hfx_filename | |
scripts/mail-alarm | |
scripts/host-display | |
github_token: ${{ secrets.github_token }} | |
reporter: github-pr-review | |
- uses: dciborow/[email protected] | |
with: | |
filter_mode: file | |
glob_pattern: "scripts/*" | |
github_token: ${{ secrets.github_token }} | |
reporter: github-pr-review |