From 6f15026495831aa7bfa8a281b0ba7df78be2b7eb Mon Sep 17 00:00:00 2001 From: Leendert de Borst Date: Wed, 31 Jul 2024 22:16:03 +0200 Subject: [PATCH] Add auto retry to E2E test for GitHub Actions as its prone to fail sometimes (#137) --- .github/workflows/dotnet-e2e-tests.yml | 27 ++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/.github/workflows/dotnet-e2e-tests.yml b/.github/workflows/dotnet-e2e-tests.yml index 58cdeffb2..659155904 100644 --- a/.github/workflows/dotnet-e2e-tests.yml +++ b/.github/workflows/dotnet-e2e-tests.yml @@ -25,9 +25,24 @@ jobs: run: dotnet build - name: Ensure browsers are installed run: pwsh src/Tests/AliasVault.E2ETests/bin/Debug/net8.0/playwright.ps1 install --with-deps - - name: Run AdminTests - run: dotnet test src/Tests/AliasVault.E2ETests --no-build --verbosity normal --filter "Category=AdminTests" - - name: Run ClientTests - run: dotnet test src/Tests/AliasVault.E2ETests --no-build --verbosity normal --filter "Category=ClientTests" - - name: Run remaining tests - run: dotnet test src/Tests/AliasVault.E2ETests --no-build --verbosity normal --filter "Category!=AdminTests&Category!=ClientTests" + + - name: Run AdminTests with retry + uses: nick-invision/retry@v2 + with: + timeout_minutes: 10 + max_attempts: 3 + command: dotnet test src/Tests/AliasVault.E2ETests --no-build --verbosity normal --filter "Category=AdminTests" + + - name: Run ClientTests with retry + uses: nick-invision/retry@v2 + with: + timeout_minutes: 10 + max_attempts: 3 + command: dotnet test src/Tests/AliasVault.E2ETests --no-build --verbosity normal --filter "Category=ClientTests" + + - name: Run remaining tests with retry + uses: nick-invision/retry@v2 + with: + timeout_minutes: 10 + max_attempts: 3 + command: dotnet test src/Tests/AliasVault.E2ETests --no-build --verbosity normal --filter "Category!=AdminTests&Category!=ClientTests"