diff --git a/.github/workflows/iroha2-dev-pr.yml b/.github/workflows/iroha2-dev-pr.yml index 07d2bbd48b..a6d4f98ed6 100644 --- a/.github/workflows/iroha2-dev-pr.yml +++ b/.github/workflows/iroha2-dev-pr.yml @@ -20,9 +20,6 @@ env: CARGO_TERM_COLOR: always IROHA_CLI_DIR: "/__w/${{ github.event.repository.name }}/${{ github.event.repository.name }}/test" DOCKER_COMPOSE_PATH: defaults - TEST_DIR: "tmp/test" - IROHA_BIN: "iroha" - IROHA_CONTAINER: "defaults-irohad0-1" jobs: consistency: @@ -238,6 +235,12 @@ jobs: needs: build_executor runs-on: [self-hosted, Linux, iroha2] timeout-minutes: 60 + env: + PYTHON_VERSION: "3.11" + POETRY_PATH: "/root/.local/bin/poetry" + TEST_DIR: "tmp/test" + IROHA_BIN: "iroha" + IROHA_CONTAINER: "defaults-irohad0-1" steps: - name: Checkout code uses: actions/checkout@v4 @@ -246,12 +249,12 @@ jobs: with: name: executor.wasm path: ${{ env.DOCKER_COMPOSE_PATH }} - - name: Install Python - uses: actions/setup-python@v5 - with: - python-version: '>=3.11' - - name: Install Poetry - uses: snok/install-poetry@v1 + - name: Install Python and Poetry + run: | + yum install -y python${{ env.PYTHON_VERSION }} python${{ env.PYTHON_VERSION }}-devel + curl -sSL https://install.python-poetry.org | python3 - + echo 'export PATH="${{ env.POETRY_PATH }}:$PATH"' >> /etc/profile + source /etc/profile - name: Set up Docker buildx id: buildx uses: docker/setup-buildx-action@v3 @@ -281,10 +284,10 @@ jobs: run: docker compose -f ${{ env.DOCKER_COMPOSE_PATH }}/docker-compose.yml up --wait || exit 1 - name: Install Torii pytest dependencies working-directory: pytests/iroha_torii_tests - run: poetry install + run: ${{ env.POETRY_PATH }} install - name: Run Torii pytests working-directory: pytests/iroha_torii_tests - run: poetry run pytest + run: ${{ env.POETRY_PATH }} run pytest - name: Copy client binary from Iroha container if: always() run: | @@ -294,7 +297,7 @@ jobs: chmod +x ${{ env.TEST_DIR }}/${{ env.IROHA_BIN }} - name: Install client pytest dependencies working-directory: pytests/iroha_cli_tests - run: poetry install + run: ${{ env.POETRY_PATH }} install - name: Run client pytests uses: nick-fields/retry@v3 env: @@ -306,7 +309,7 @@ jobs: max_attempts: 5 command: | cd pytests/iroha_cli_tests - poetry run pytest + ${{ env.POETRY_PATH }} run pytest on_retry_command: | docker compose -f ${{ env.DOCKER_COMPOSE_PATH }}/docker-compose.yml down docker compose -f ${{ env.DOCKER_COMPOSE_PATH }}/docker-compose.local.yml up --wait || exit 1