1- name : Iroha 2 pull request pytests
1+ name : Iroha2:PR::Pytests
22
33on :
44 repository_dispatch :
55 types : [dispatch-event]
66 pull_request :
77 branches : [main]
88
9+ env :
10+ TOOLCHAIN_VER : nightly-2024-09-09
11+ IROHA_BRANCH : 2.0.0-rc.1
12+
913jobs :
1014 pytest :
1115 runs-on : ubuntu-latest
@@ -22,11 +26,11 @@ jobs:
2226 - name : Install dependencies
2327 run : pip install poetry tomli-w
2428 - name : Checkout irohad repo code
25- run : git clone --depth 1 https://github.com/hyperledger-iroha/iroha.git -b 2.0.0-rc.1 iroha_daemon
29+ run : git clone --depth 1 https://github.com/hyperledger-iroha/iroha.git -b ${{ env.IROHA_BRANCH }} iroha_daemon
2630 - name : Install correct rust version
27- run : rustup install nightly-2024-09-09 && rustup component add rust-src --toolchain nightly-2024-09-09
31+ run : rustup install ${{ env.TOOLCHAIN_VER }} && rustup component add rust-src --toolchain ${{ env.TOOLCHAIN_VER }}
2832 - name : Set toolchain
29- run : rustup default nightly-2024-09-09
33+ run : rustup default ${{ env.TOOLCHAIN_VER }}
3034 - name : Build irohad
3135 run : cd iroha_daemon && cargo build --release && mkdir target/debug -p && cp target/release/irohad target/debug/irohad && cp target/release/iroha target/debug/iroha
3236 - name : Build kagami
3943 cd iroha_daemon && scripts/test_env.py setup && cd .. &&
4044 python -m venv .venv &&
4145 source .venv/bin/activate &&
42- pip install pytest faker allure-pytest &&
46+ pip install pytest faker allure-pytest pytest-cov &&
4347 pip install --break-system-packages target/wheels/iroha2-*.whl &&
44- python -m pytest tests/"
48+ python -m pytest --cov=. --cov-report xml:coverage-reports/coverage.xml tests/"
4549 - name : Tear down the network
50+ if : always()
4651 run : cd iroha_daemon && scripts/test_env.py cleanup
52+ - name : Upload coverage report
53+ uses : actions/upload-artifact@v4
54+ with :
55+ name : report-coverage
56+ path : coverage-reports/coverage.xml
57+ retention-days : 1
0 commit comments