[testing workflow] Disable shards when re-running failed tests (#50492)
This commit is contained in:
parent
c406f1991e
commit
ff347bdcd4
|
@ -213,7 +213,9 @@ jobs:
|
|||
if [ "$failedTests" -gt 0 ]; then
|
||||
if [ "$LAST_FAILED_RUN" == "1" ]; then
|
||||
echo "Found failed tests, running only failed tests"
|
||||
lastRunFlag="--last-failed"
|
||||
# Add shard 1/1 to override the default shard value. No tests will run for shards > 1.
|
||||
# The clean way would be to replace the shard flag from the command, but this also works.
|
||||
lastRunFlag="--last-failed --shard=1/1"
|
||||
else
|
||||
echo "Found failed tests, but LAST_FAILED_RUN is switched off. Running all tests."
|
||||
fi
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
|
||||
CI: Use a single shard when re-running failed tests in CI
|
|
@ -1,3 +1,4 @@
|
|||
/.state
|
||||
/test-results
|
||||
/envs/_default
|
||||
/playwright-report
|
||||
|
|
|
@ -15,7 +15,6 @@ const {
|
|||
CI,
|
||||
DEFAULT_TIMEOUT_OVERRIDE,
|
||||
E2E_MAX_FAILURES,
|
||||
PLAYWRIGHT_HTML_REPORT,
|
||||
REPEAT_EACH,
|
||||
} = process.env;
|
||||
|
||||
|
@ -54,9 +53,7 @@ if ( process.env.CI ) {
|
|||
reporter.push( [
|
||||
'html',
|
||||
{
|
||||
outputFolder:
|
||||
PLAYWRIGHT_HTML_REPORT ??
|
||||
`${ testsResultsPath }/reports/playwright-report`,
|
||||
outputFolder: `${ testsResultsPath }/playwright-report`,
|
||||
open: 'on-failure',
|
||||
},
|
||||
] );
|
||||
|
|
Loading…
Reference in New Issue