mirror of
https://github.com/pestphp/pest.git
synced 2026-06-05 10:52:14 +02:00
wip
This commit is contained in:
@ -143,6 +143,8 @@ final class Tia implements AddsOutput, HandlesArguments, Terminable
|
|||||||
|
|
||||||
private ?string $driftDetails = null;
|
private ?string $driftDetails = null;
|
||||||
|
|
||||||
|
private ?string $freshGraphReason = null;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly OutputInterface $output,
|
private readonly OutputInterface $output,
|
||||||
private readonly Recorder $recorder,
|
private readonly Recorder $recorder,
|
||||||
@ -657,6 +659,10 @@ final class Tia implements AddsOutput, HandlesArguments, Terminable
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($this->piggybackCoverage && ! $this->state->exists(self::KEY_COVERAGE_CACHE)) {
|
if ($this->piggybackCoverage && ! $this->state->exists(self::KEY_COVERAGE_CACHE)) {
|
||||||
|
if ($graph instanceof Graph && $this->driftLabel === null) {
|
||||||
|
$this->freshGraphReason = 'recording coverage baseline';
|
||||||
|
}
|
||||||
|
|
||||||
return $this->enterRecordMode($arguments);
|
return $this->enterRecordMode($arguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1011,6 +1017,8 @@ final class Tia implements AddsOutput, HandlesArguments, Terminable
|
|||||||
|
|
||||||
if ($this->driftLabel !== null) {
|
if ($this->driftLabel !== null) {
|
||||||
$headline .= sprintf(' (%s changed)', $this->driftLabel);
|
$headline .= sprintf(' (%s changed)', $this->driftLabel);
|
||||||
|
} elseif ($this->freshGraphReason !== null) {
|
||||||
|
$headline .= sprintf(' (%s)', $this->freshGraphReason);
|
||||||
} else {
|
} else {
|
||||||
$headline .= '.';
|
$headline .= '.';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -312,14 +312,14 @@ final readonly class BaselineSync
|
|||||||
{
|
{
|
||||||
$artifactSize = $this->artifactSize($repo, $runId);
|
$artifactSize = $this->artifactSize($repo, $runId);
|
||||||
|
|
||||||
$this->renderBadge('INFO', $artifactSize !== null
|
$this->renderChild($artifactSize !== null
|
||||||
? sprintf(
|
? sprintf(
|
||||||
'Fetching baseline (%s) from %s…',
|
'Downloading TIA baseline (%s) from %s…',
|
||||||
$this->formatSize($artifactSize),
|
$this->formatSize($artifactSize),
|
||||||
$repo,
|
$repo,
|
||||||
)
|
)
|
||||||
: sprintf(
|
: sprintf(
|
||||||
'Fetching baseline from %s…',
|
'Downloading TIA baseline from %s…',
|
||||||
$repo,
|
$repo,
|
||||||
));
|
));
|
||||||
|
|
||||||
@ -411,7 +411,7 @@ final readonly class BaselineSync
|
|||||||
if ($totalBytes !== null && $totalBytes > 0) {
|
if ($totalBytes !== null && $totalBytes > 0) {
|
||||||
$percent = min(99, (int) floor(($current / $totalBytes) * 100));
|
$percent = min(99, (int) floor(($current / $totalBytes) * 100));
|
||||||
$message = sprintf(
|
$message = sprintf(
|
||||||
' <fg=cyan>Downloading</> %s / %s (%d%%, %s/s)',
|
' <fg=gray>%s / %s (%d%%, %s/s)</>',
|
||||||
$this->formatSize($current),
|
$this->formatSize($current),
|
||||||
$this->formatSize($totalBytes),
|
$this->formatSize($totalBytes),
|
||||||
$percent,
|
$percent,
|
||||||
@ -419,7 +419,7 @@ final readonly class BaselineSync
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$message = sprintf(
|
$message = sprintf(
|
||||||
' <fg=cyan>Downloading</> %s (%s/s)',
|
' <fg=gray>%s (%s/s)</>',
|
||||||
$this->formatSize($current),
|
$this->formatSize($current),
|
||||||
$this->formatSize($speed),
|
$this->formatSize($speed),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user