From 1304f852db394d20145415abe0edfec8ed2a0c5c Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Thu, 1 Aug 2024 16:07:13 -0300 Subject: [PATCH] ci(workflows): implement retry logic in python_test workflow for unit tests (#3145) * feat(workflows): add NODE_VERSION to python_test workflow for Node.js setup Enhanced the CI workflow by including Node.js setup with version 21 to support JavaScript components * fix(workflows): implement retry logic in python_test workflow for unit tests Added a retry mechanism to enhance test reliability in CI workflow --- .github/workflows/python_test.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python_test.yml b/.github/workflows/python_test.yml index 9413cc8bd..7128870fa 100644 --- a/.github/workflows/python_test.yml +++ b/.github/workflows/python_test.yml @@ -10,6 +10,7 @@ on: type: string env: POETRY_VERSION: "1.8.2" + NODE_VERSION: "21" jobs: build: @@ -29,6 +30,11 @@ jobs: - uses: actions/checkout@v4 with: ref: ${{ inputs.branch || github.ref }} + - name: Setup Node.js + uses: actions/setup-node@v4 + id: setup-node + with: + node-version: ${{ env.NODE_VERSION }} - name: Set up Python ${{ matrix.python-version }} + Poetry ${{ env.POETRY_VERSION }} uses: "./.github/actions/poetry_caching" with: @@ -40,9 +46,11 @@ jobs: poetry env use ${{ matrix.python-version }} poetry install - name: Run unit tests - timeout-minutes: 12 - run: | - make unit_tests args="--splits ${{ matrix.splitCount }} --group ${{ matrix.group }}" + uses: nick-fields/retry@v2 + with: + timeout_minutes: 12 + max_attempts: 2 + command: make unit_tests args="--splits ${{ matrix.splitCount }} --group ${{ matrix.group }}" test-cli: name: Test CLI - Python ${{ matrix.python-version }}