[refactor] #3719: Migrate integration Rust tests to client cli pytests #7033
Workflow file for this run
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: I2::Dev::Static | |
on: | |
pull_request: | |
branches: [iroha2-dev] | |
paths: | |
- '**.rs' | |
- '**.json' | |
- '**.toml' | |
- '.github/workflows/**.yml' | |
- 'client_cli/pytests/**/*.py' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
RUSTUP_TOOLCHAIN: nightly-2024-01-12 | |
jobs: | |
smart_contracts_analysis: | |
runs-on: ubuntu-latest | |
container: | |
image: hyperledger/iroha2-ci:nightly-2024-01-12 | |
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-01-12 | |
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 | |
- 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: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12.2' | |
- 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 . |