Skip to content

Commit

Permalink
Run tests 10 times to detect flakiness
Browse files Browse the repository at this point in the history
Signed-off-by: Dinika Saxena <[email protected]>
  • Loading branch information
Dinika committed Jun 11, 2024
1 parent acafa60 commit c753ec0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ unit-test:
policy: pull
script:
- *install_packages
- npm run test:ci
- for i in $(seq 10); do npm run test:ci || { echo 'Failed after $i attempts' && break; }; done

build:
stage: check
Expand Down
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const customJestConfig = {
testEnvironmentOptions: {
customExportConditions: [''],
},
showSeed: true,
testTimeout: 10_000, // Default is 5000 ms which is a bit low for our ci (MemoryRequest - 4Gi, MemoryLimit - 8Gi)
};

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"prettier:check": "prettier --check . --log-level warn",
"prettier:write": "prettier --write . --log-level warn",
"test": "jest --watch",
"test:fail": "jest Library --silent",
"test:ci": "jest",
"analyze": "ANALYZE=true npm run build"
},
Expand Down

0 comments on commit c753ec0

Please sign in to comment.