Skip to content

Commit

Permalink
fix: CI and irohad version
Browse files Browse the repository at this point in the history
Signed-off-by: Sam H. Smith <sam.henning.smith@protonmail.com>
  • Loading branch information
SamHSmith committed Nov 5, 2024
1 parent b090d49 commit 8cf76fb
Show file tree
Hide file tree
Showing 5 changed files with 378 additions and 214 deletions.
26 changes: 0 additions & 26 deletions .github/workflows/main.yml

This file was deleted.

49 changes: 25 additions & 24 deletions .github/workflows/pr-pytests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on:
pull_request:
branches: [main]

env:
IROHA_REF: main

jobs:
pytest:
runs-on: ubuntu-latest
Expand All @@ -20,26 +17,30 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install poetry
- name: Checkout iroha main repo code
uses: actions/checkout@v4
with:
repository: 'hyperledger/iroha'
ref: ${{ env.IROHA_REF}}
- name: Run docker-compose.yml containers
run: docker compose -f ./defaults/docker-compose.yml up --wait || exit 1
- 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 docker containers
if: always()
run: docker stop $(docker ps -q) && docker rm $(docker ps -a -q)
- name: Install dependencies
run: pip install poetry tomli-w
- name: Checkout irohad repo code
run: git clone --depth 1 https://github.com/hyperledger-iroha/iroha.git -b 2.0.0-rc.1 iroha_daemon
- 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_daemon && 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_daemon && cargo build --bin kagami
- name: Build default executor
run: cd iroha_daemon && cargo run --release --bin iroha_wasm_builder -- build ./wasm_samples/default_executor --optimize --out-file ./defaults/executor.wasm
- name: Maturin build and Run tests
run: bash -c " pip install maturin &&
maturin build &&
cd iroha_daemon && scripts/test_env.py setup && cd .. &&
python -m venv .venv &&
source .venv/bin/activate &&
pip install pytest faker allure-pytest &&
pip install --break-system-packages target/wheels/iroha-*.whl &&
python -m pytest tests/"
- name: Tear down the network
run: cd iroha_daemon && scripts/test_env.py cleanup
58 changes: 0 additions & 58 deletions .github/workflows/pr.yml

This file was deleted.

Loading

0 comments on commit 8cf76fb

Please sign in to comment.