Skip to content

Commit f7b4b0c

Browse files
0x5bfayaira2
andauthored
GitHub: Retry integration tests if they fail first run (#16310)
Co-authored-by: Yair <[email protected]>
1 parent ef048b2 commit f7b4b0c

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,17 @@ jobs:
236236
shell: pwsh
237237
run: Start-Process -FilePath "$env:WINAPPDRIVER_EXE86_PATH"
238238

239+
# Retry integration tests if first attempt fails
239240
- name: Run interaction tests
240-
run: |
241-
dotnet test `
242-
$env:AUTOMATED_TESTS_ASSEMBLY_DIR\**\Files.InteractionTests.dll `
243-
--logger "trx;LogFileName=$env:AUTOMATED_TESTS_ASSEMBLY_DIR\testResults.trx"
241+
uses: nick-fields/retry@v3
242+
with:
243+
timeout_minutes: 15
244+
max_attempts: 2
245+
shell: pwsh
246+
command: |
247+
dotnet test `
248+
$env:AUTOMATED_TESTS_ASSEMBLY_DIR\**\Files.InteractionTests.dll `
249+
--logger "trx;LogFileName=$env:AUTOMATED_TESTS_ASSEMBLY_DIR\testResults.trx"
244250
245251
# - name: Generate markdown from the tests result
246252
# shell: pwsh

0 commit comments

Comments
 (0)