Skip to content

Commit 108c90f

Browse files
committed
Fetch tags manually
1 parent d572b96 commit 108c90f

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tests/system/AutoReview/CreateNewChangelogTest.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,18 @@ protected function setUp(): void
3131
{
3232
parent::setUp();
3333

34-
exec('git describe --tags --abbrev=0 2>/dev/null', $output, $exitCode);
34+
if (getenv('GITHUB_ACTIONS') !== false) {
35+
exec('git fetch --unshallow', $output, $exitCode);
36+
exec('git fetch --tags 2>&1', $output, $exitCode);
37+
}
38+
39+
exec('git describe --tags --abbrev=0 2>&1', $output, $exitCode);
3540

3641
if ($exitCode !== 0) {
37-
$this->markTestSkipped('Unable to determine the current version from git tags.');
42+
$this->markTestSkipped(sprintf(
43+
"Unable to get the latest git tag.\nOutput: %s",
44+
implode("\n", $output),
45+
));
3846
}
3947

4048
// Current tag should already have the next patch docs done, so for testing purposes,

0 commit comments

Comments
 (0)