Skip to content

Commit

Permalink
[feature] Add Python checks in CI #3961
Browse files Browse the repository at this point in the history
Signed-off-by: alexstroke <[email protected]>
  • Loading branch information
alexstroke authored and AlexStroke committed Feb 14, 2024
1 parent c3180ab commit 933d87a
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/iroha2-dev-pr-static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- '**.json'
- '**.toml'
- '.github/workflows/**.yml'
- 'client_cli/pytests/**/*.py'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -54,3 +55,37 @@ jobs:
- name: Documentation
if: always()
run: cargo doc --no-deps --quiet
python_static_analysis:
runs-on: ubuntu-latest
container:
image: hyperledger/iroha2-ci:nightly-2024-01-12
steps:
- uses: actions/checkout@v4

- name: Install Python static analysis tools
run: |
which python
which pip
python --version
pip --version
python -m pip install black flake8 isort mypy
- name: Run Black (Code Formatter)
run: |
cd client_cli/pytests
black --check .
- name: Run flake8 (Linter)
run: |
cd client_cli/pytests
flake8 .
- name: Run isort (Import Sorter)
run: |
cd client_cli/pytests
isort --check-only .
- name: Run mypy (Type Checker)
run: |
cd client_cli/pytests
mypy .

0 comments on commit 933d87a

Please sign in to comment.