Retry flaky tests

This commit is contained in:
Steve Faulkner 2021-04-21 11:01:16 -05:00
parent a07aff1e8c
commit d5f3230f6f
2 changed files with 9 additions and 5 deletions

View File

@ -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()

View File

@ -9,9 +9,5 @@ module.exports = {
},
contextOptions: {
ignoreHTTPSErrors: true,
viewport: {
width: 1920,
height: 1080,
},
},
};