[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 [ "$failedTests" -gt 0 ]; then
|
||||||
if [ "$LAST_FAILED_RUN" == "1" ]; then
|
if [ "$LAST_FAILED_RUN" == "1" ]; then
|
||||||
echo "Found failed tests, running only failed tests"
|
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
|
else
|
||||||
echo "Found failed tests, but LAST_FAILED_RUN is switched off. Running all tests."
|
echo "Found failed tests, but LAST_FAILED_RUN is switched off. Running all tests."
|
||||||
fi
|
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
|
/.state
|
||||||
/test-results
|
/test-results
|
||||||
/envs/_default
|
/envs/_default
|
||||||
|
/playwright-report
|
||||||
|
|
|
@ -15,7 +15,6 @@ const {
|
||||||
CI,
|
CI,
|
||||||
DEFAULT_TIMEOUT_OVERRIDE,
|
DEFAULT_TIMEOUT_OVERRIDE,
|
||||||
E2E_MAX_FAILURES,
|
E2E_MAX_FAILURES,
|
||||||
PLAYWRIGHT_HTML_REPORT,
|
|
||||||
REPEAT_EACH,
|
REPEAT_EACH,
|
||||||
} = process.env;
|
} = process.env;
|
||||||
|
|
||||||
|
@ -54,9 +53,7 @@ if ( process.env.CI ) {
|
||||||
reporter.push( [
|
reporter.push( [
|
||||||
'html',
|
'html',
|
||||||
{
|
{
|
||||||
outputFolder:
|
outputFolder: `${ testsResultsPath }/playwright-report`,
|
||||||
PLAYWRIGHT_HTML_REPORT ??
|
|
||||||
`${ testsResultsPath }/reports/playwright-report`,
|
|
||||||
open: 'on-failure',
|
open: 'on-failure',
|
||||||
},
|
},
|
||||||
] );
|
] );
|
||||||
|
|
Loading…
Reference in New Issue