Skip to content

Workflow file for this run

name: Iroha 2 pull request pytests
on:
repository_dispatch:
types: [dispatch-event]
pull_request:
branches: [main]
jobs:
pytest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.12 ]
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
run: pip install poetry tomli-w pytest && python -c "import pytest; print(dir(pytest))" && poetry run python -m pytest tests/
- name: Checkout irohad repo code
run: git clone --depth 1 https://github.com/hyperledger-iroha/iroha.git -b 2.0.0-rc.1
- name: Install correct rust version
run: rustup install nightly-2024-09-09 && rustup component add rust-src --toolchain nightly-2024-09-09
- name: Set toolchain
run: rustup default nightly-2024-09-09
- name: Build irohad
run: cd iroha && cargo build --release && mkdir target/debug -p && cp target/release/irohad target/debug/irohad && cp target/release/iroha target/debug/iroha
- name: Build kagami
run: cd iroha && cargo build --bin kagami
- name: Build default executor
run: cd iroha && cargo run --release --bin iroha_wasm_builder -- build ./wasm_samples/default_executor --optimize --out-file ./defaults/executor.wasm
- name: Run test network and return up
run: cd iroha && scripts/test_env.py setup
- name: Maturin build and Run tests
run: |
pip install maturin
maturin build
pip install --break-system-packages target/wheels/iroha-*.whl
python -c "import iroha; print(dir(iroha))"
poetry run python -m pytest tests/
- name: Tear down the network
run: cd iroha && scripts/test_env.py cleanup