From f5eea961bdf84e1301fee2c9218019793546d95e Mon Sep 17 00:00:00 2001 From: alexstroke1 Date: Mon, 5 Aug 2024 15:34:02 +0200 Subject: [PATCH] ci: optimize job vars MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Александр Строков --- .github/workflows/iroha2-dev-pr.yml | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/iroha2-dev-pr.yml b/.github/workflows/iroha2-dev-pr.yml index d6ef7670a31..26cd458a39f 100644 --- a/.github/workflows/iroha2-dev-pr.yml +++ b/.github/workflows/iroha2-dev-pr.yml @@ -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: @@ -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: @@ -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() @@ -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