Skip to content

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

Python3 deploy action mypy to review this pr.new

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

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-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: tsuyoshicho/[email protected]
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
- uses: reviewdog/action-actionlint@v1
name: GitHub Action linter from https://github.com/reviewdog/action-actionlint
with:
github_token: ${{ secrets.github_token }}
level: error
reporter: github-pr-review