Skip to content

Commit 731a5e7

Browse files
authored
chore: fix release automation failures on the first run (#10610)
1 parent 3625609 commit 731a5e7

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

‎.github/workflows/verify-release.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
php-version: '8.2'
7777
tools: composer
7878
extensions: intl, gd
79-
coverage: none
79+
coverage: xdebug
8080

8181
- name: Wait for Packagist to serve the new framework version
8282
run: |

‎tests/system/AutoReview/UpdateUpgradeGuideTest.php‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function testErrorWhenUpgradeGuideIsMissing(): void
7575

7676
public function testDryRunPrintsSectionsWithoutWriting(): void
7777
{
78-
$this->assertFileExists($this->upgradePath);
78+
$this->skipIfUpgradeGuideIsMissing();
7979

8080
exec(sprintf('php ./admin/update-upgrade-guide.php %s --dry-run 2>&1', $this->nextVersion), $output, $exitCode);
8181
$outputString = implode("\n", $output);
@@ -88,7 +88,7 @@ public function testDryRunPrintsSectionsWithoutWriting(): void
8888

8989
public function testUpdatesUpgradeGuide(): void
9090
{
91-
$this->assertFileExists($this->upgradePath);
91+
$this->skipIfUpgradeGuideIsMissing();
9292

9393
if (trim((string) exec("git status --porcelain -- {$this->upgradePath}")) !== '') {
9494
$this->markTestSkipped('You have uncommitted changes to the upgrade guide that will be erased by this test.');
@@ -110,4 +110,14 @@ public function testUpdatesUpgradeGuide(): void
110110
exec("git restore -- {$this->upgradePath}");
111111
}
112112
}
113+
114+
private function skipIfUpgradeGuideIsMissing(): void
115+
{
116+
if (! is_file($this->upgradePath)) {
117+
$this->markTestSkipped(sprintf(
118+
'%s does not exist yet. It is created by "php admin/create-new-changelog.php" after a release.',
119+
$this->upgradePath,
120+
));
121+
}
122+
}
113123
}

0 commit comments

Comments
 (0)