-
Notifications
You must be signed in to change notification settings - Fork 81
50 lines (47 loc) · 1.59 KB
/
pr-pytests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Iroha 2 pull request pytests
on:
repository_dispatch:
types: [dispatch-event]
pull_request:
branches: [main]
env:
IROHA_REF: 2.0.0-rc.1
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: Install dependencies
run: pip install poetry tomli-w
- name: Checkout irohad repo code
uses: actions/checkout@v4
with:
repository: 'hyperledger-iroha/iroha'
ref: ${{ env.IROHA_REF}}
- name: Install correct rust version
run: rustup install nightly-2024-09-09 && rustup component add rust-src --toolchain nightly-2024-09-09
- name: Build irohad
run: cargo build --release && mkdir target/debug -p && cp target/release/irohad target/debug/irohad
- name: Build default executor
run: cargo run --release --bin iroha_wasm_builder -- build ./wasm_samples/default_executor --optimize --out-file ./defaults/executor.wasm
- name: Run test network
run: scripts/test_env.py setup
- name: Checkout code
uses: actions/checkout@v4
- name: Maturin build
run: |
pip install maturin
maturin build
poetry add target/wheels/*
- name: Install project dependencies
run: poetry install
- name: Run tests
run: poetry run pytest tests
- name: Tear down the network
run: scripts/test_env.py cleanup