Skip to content

Commit

Permalink
ci: optimize job vars
Browse files Browse the repository at this point in the history
Signed-off-by: Александр Строков <[email protected]>
  • Loading branch information
alexstroke1 authored and Александр Строков committed Aug 5, 2024
1 parent 1820b3e commit f5eea96
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions .github/workflows/iroha2-dev-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ env:
IROHA_BIN: "iroha"
IROHA_CONTAINER: "defaults-irohad0-1"
PYTHON_VERSION: "3.11"
POETRY_PATH: "/root/.local/bin/poetry"

jobs:
consistency:
Expand Down Expand Up @@ -150,7 +149,7 @@ jobs:
name: clippy.json
path: clippy.json

torii-api-client-cli-docker-compose-tests:
torii-api-client-cli-tests:
runs-on: [self-hosted, Linux, iroha2]
timeout-minutes: 60
steps:
Expand All @@ -170,7 +169,7 @@ jobs:
source /etc/profile
- name: Install Torii API Dependencies
working-directory: torii/pytests
run: ${{ env.POETRY_PATH }} install
run: poetry install
- name: Build and Tag Docker Images
uses: docker/build-push-action@v6
if: always()
Expand All @@ -195,22 +194,22 @@ jobs:
run: docker compose -f ${{ env.DOCKER_COMPOSE_PATH }}/docker-compose.yml up --wait || exit 1
- name: Run Torii API Tests
working-directory: torii/pytests
run: ${{ env.POETRY_PATH }} run pytest
run: poetry run pytest
- name: Copy Client CLI Binary from Iroha Container
run: |
mkdir -p ${{ env.TEST_DIR }}
docker cp ${{ env.IROHA_CONTAINER }}:/usr/local/bin/${{ env.IROHA_BIN }} ${{ env.TEST_DIR }}
cp ./defaults/client.toml ${{ env.TEST_DIR }}
mkdir -p ${{ /tmp/env.TEST_DIR }}
docker cp ${{ env.IROHA_CONTAINER }}:/usr/local/bin/${{ env.IROHA_BIN }} ${{ /tmp/env.TEST_DIR }}
cp ./defaults/client.toml ${{ /tmp/env.TEST_DIR }}
- name: Make Binaries Executable
run: chmod +x ${{ env.TEST_DIR }}/${{ env.IROHA_BIN }}
run: chmod +x ${{ /tmp/env.TEST_DIR }}/${{ env.IROHA_BIN }}
- name: Install Client CLI Dependencies
working-directory: client_cli/pytests
run: ${{ env.POETRY_PATH }} install
run: poetry install
- name: Run Client CLI Tests
working-directory: client_cli/pytests
env:
CLIENT_CLI_BINARY: ../../${{ env.TEST_DIR }}/${{ env.IROHA_BIN }}
CLIENT_CLI_CONFIG: ../../${{ env.TEST_DIR }}/client.toml
run: ${{ env.POETRY_PATH }} run pytest
CLIENT_CLI_BINARY: ../../${{ /tmp/env.TEST_DIR }}/${{ env.IROHA_BIN }}
CLIENT_CLI_CONFIG: ../../${{ /tmp/env.TEST_DIR }}/client.toml
run: poetry run pytest
- name: Wipe docker-compose.yml containers
run: docker compose -f ${{ env.DOCKER_COMPOSE_PATH }}/docker-compose.yml down

0 comments on commit f5eea96

Please sign in to comment.