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
This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-08-01 16:07:13 -03:00 committed by GitHub
commit 1304f852db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 }}