From d5f3230f6f96ab536178842e6ff5f8be05c466f7 Mon Sep 17 00:00:00 2001 From: Steve Faulkner Date: Wed, 21 Apr 2021 11:01:16 -0500 Subject: [PATCH] Retry flaky tests --- .github/workflows/ci.yml | 10 +++++++++- jest-playwright.config.js | 4 ---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 574a8d613..e0a0f8614 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -154,7 +154,15 @@ jobs: - run: npm start & - run: npm run wait-for-server - name: ${{ matrix['test-file'] }} - run: npx jest -c ./jest.config.playwright.js ${{ matrix['test-file'] }} + run: | + # Run tests up to three times + n=0 + until [ "$n" -ge 3 ] + do + npx jest -c ./jest.config.playwright.js ${{ matrix['test-file'] }} && break + n=$((n+1)) + sleep 1 + done shell: bash - uses: actions/upload-artifact@v2 if: failure() diff --git a/jest-playwright.config.js b/jest-playwright.config.js index 53103b830..d66e8f221 100644 --- a/jest-playwright.config.js +++ b/jest-playwright.config.js @@ -9,9 +9,5 @@ module.exports = { }, contextOptions: { ignoreHTTPSErrors: true, - viewport: { - width: 1920, - height: 1080, - }, }, };