Skip to content

Commit 68d1c76

Browse files
authored
added retry to unit tests (#3709)
Co-authored-by: maxcapodi78 <Shark78>
1 parent 80ecab9 commit 68d1c76

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

.github/workflows/unit_tests.yml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,15 @@ jobs:
6666
# uses: pyansys/pydpf-actions/[email protected]
6767

6868
- name: 'Unit testing'
69-
timeout-minutes: 40
70-
run: |
71-
testenv_s\Scripts\Activate.ps1
72-
Set-Item -Path env:PYTHONMALLOC -Value "malloc"
73-
pytest --durations=50 -v --cov=pyaedt --cov-report=xml --cov-report=html --junitxml=junit/test-results.xml _unittest_solvers
69+
uses: nick-fields/retry@v2
70+
with:
71+
max_attempts: 3
72+
retry_on: error
73+
timeout_minutes: 40
74+
command: |
75+
testenv_s\Scripts\Activate.ps1
76+
Set-Item -Path env:PYTHONMALLOC -Value "malloc"
77+
pytest --durations=50 -v --cov=pyaedt --cov-report=xml --cov-report=html --junitxml=junit/test-results.xml _unittest_solvers
7478
7579
- uses: codecov/codecov-action@v3
7680
env:
@@ -125,11 +129,15 @@ jobs:
125129
# uses: pyansys/pydpf-actions/[email protected]
126130

127131
- name: 'Unit testing'
128-
timeout-minutes: 40
129-
run: |
130-
testenv\Scripts\Activate.ps1
131-
Set-Item -Path env:PYTHONMALLOC -Value "malloc"
132-
pytest -n 6 --dist loadfile --durations=50 -v --cov=pyaedt --cov-report=xml --cov-report=html --junitxml=junit/test-results.xml _unittest
132+
uses: nick-fields/retry@v2
133+
with:
134+
max_attempts: 3
135+
retry_on: error
136+
timeout_minutes: 40
137+
command: |
138+
testenv\Scripts\Activate.ps1
139+
Set-Item -Path env:PYTHONMALLOC -Value "malloc"
140+
pytest -n 6 --dist loadfile --durations=50 -v --cov=pyaedt --cov-report=xml --cov-report=html --junitxml=junit/test-results.xml _unittest
133141
134142
- uses: codecov/codecov-action@v3
135143
env:

0 commit comments

Comments
 (0)