Skip to content

Commit

Permalink
ci: new ci
Browse files Browse the repository at this point in the history
Signed-off-by: alexstroke <[email protected]>
  • Loading branch information
AlexStroke committed Jul 23, 2024
1 parent 6f28b38 commit 45fbe41
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 13 deletions.
41 changes: 30 additions & 11 deletions .github/workflows/iroha2-dev-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ concurrency:
env:
CARGO_TERM_COLOR: always
CLIENT_CLI_DIR: "/__w/${{ github.event.repository.name }}/${{ github.event.repository.name }}/test"
DOCKER_COMPOSE_PATH: configs/swarm

jobs:
consistency:
runs-on: [self-hosted, Linux, iroha2]
container:
image: hyperledger/iroha2-ci:nightly-2024-04-18
#container:
# image: hyperledger/iroha2-ci:nightly-2024-04-18
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -152,16 +153,37 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: Build binaries
- name: Set up Docker Buildx
id: buildx
if: always()
uses: docker/setup-buildx-action@v3
with:
install: true
- name: Build and export to Docker iroha:local and iroha:dev images
uses: docker/build-push-action@v6
if: always()
with:
context: .
load: true
file: Dockerfile
tags: |
hyperledger/iroha:local
hyperledger/iroha:dev
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Test docker-compose.yml containers
run: |
cargo build -p iroha_client_cli -p kagami -p irohad
- name: Setup test Iroha 2 environment on the bare metal
docker compose -f ${{ env.DOCKER_COMPOSE_PATH }}/docker-compose.yml up --wait || exit 1
- name: Show containers names
run: docker ps -a
- name: Copy build client cli bin from peer into runner
run: |
pip3 install -r scripts/requirements.txt --no-input --break-system-packages
./scripts/test_env.py setup
mkdir -p test
docker cp swarm-irohad0-1:/usr/local/bin/iroha test
cp ./configs/swarm/client.toml test
- name: Mark binaries as executable
run: |
chmod +x ${{ env.CLIENT_CLI_DIR }}
chmod +x test/iroha
- name: Install torii api dependencies using Poetry
working-directory: torii/pytests
run: |
Expand All @@ -182,6 +204,3 @@ jobs:
CLIENT_CLI_CONFIG: ../../test/client.toml
run: |
poetry run pytest
- name: Cleanup test environment
run: |
./scripts/test_env.py cleanup
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[{
"Unregister": {
"Asset": {
"object": "rose#ed0120CE7FA46C9DCE7EA4B125E2E36BDB63EA33073E7590AC92816AE1E861B7048B03@wonderland"
"object": "rose##ed0120CE7FA46C9DCE7EA4B125E2E36BDB63EA33073E7590AC92816AE1E861B7048B03@wonderland"
}
}
}]
2 changes: 1 addition & 1 deletion client_cli/pytests/src/client_cli/client_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def _execute_isi(self, temp_file_path):
:type temp_file_path: str
"""
self._execute_pipe(
["cat", temp_file_path], [self.BASE_PATH] + self.BASE_FLAGS + ["json"]
["cat", temp_file_path], [self.BASE_PATH] + self.BASE_FLAGS + ["json"] + ["transaction"]
)

def register_trigger(self, account):
Expand Down

0 comments on commit 45fbe41

Please sign in to comment.