Skip to content

ci: fix with_coverage, isolate not unstable but extra_functional #7654

ci: fix with_coverage, isolate not unstable but extra_functional

ci: fix with_coverage, isolate not unstable but extra_functional #7654

name: I2::Dev::Static
on:
pull_request:
branches: [main]
paths:
- '**.rs'
- '**.json'
- '**.toml'
- '.github/workflows/iroha2-dev-pr-static.yml'
- 'client_cli/pytests/**/*.py'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
RUSTUP_TOOLCHAIN: nightly-2024-04-18
jobs:
smart_contracts_analysis:
runs-on: ubuntu-latest
container:
image: hyperledger/iroha2-ci:nightly-2024-04-18
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: Default executor format
run: |
cd ./default_executor
mold --run cargo fmt --all -- --check
- name: Integration tests smart contracts format
run: |
cd ./client/tests/integration/smartcontracts
mold --run cargo fmt --all -- --check
workspace_analysis:
runs-on: ubuntu-latest
container:
image: hyperledger/iroha2-ci:nightly-2024-04-18
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: Format
run: cargo fmt --all -- --check
- name: Lints without features
if: always()
run: cargo clippy --workspace --benches --tests --examples --no-default-features --quiet
- name: Lints with all features enabled
if: always()
run: cargo clippy --workspace --benches --tests --examples --all-features --quiet --message-format=json &> clippy.json
- name: Documentation
if: always()
run: cargo doc --no-deps --quiet
- name: Upload clippy report artifact
uses: actions/upload-artifact@v4
with:
name: clippy.json
path: clippy.json
python_static_analysis:
runs-on: ubuntu-latest
container:
image: hyperledger/iroha2-ci:nightly-2024-04-18
steps:
- uses: actions/checkout@v4
- name: Install dependencies using Poetry
working-directory: client_cli/pytests
run: |
poetry install
- name: Check code formatting with Black
working-directory: client_cli/pytests
run: |
poetry run black --check .
- name: Run mypy (Type Checker)
working-directory: client_cli/pytests
run: |
poetry run mypy --explicit-package-bases .
- name: Run flake8 (Linter)
working-directory: client_cli/pytests
run: |
poetry run flake8 . --max-line-length=110 --ignore=F401,W503,E203