File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -27,14 +27,27 @@ final class CreateNewChangelogTest extends TestCase
2727{
2828 private string $ currentVersion ;
2929
30+ public static function setUpBeforeClass (): void
31+ {
32+ parent ::setUpBeforeClass ();
33+
34+ if (getenv ('GITHUB_ACTIONS ' ) !== false ) {
35+ exec ('git fetch --unshallow 2>&1 ' , $ output , $ exitCode );
36+ exec ('git fetch --tags 2>&1 ' , $ output , $ exitCode );
37+ }
38+ }
39+
3040 protected function setUp (): void
3141 {
3242 parent ::setUp ();
3343
34- exec ('git describe --tags --abbrev=0 2>/dev/null ' , $ output , $ exitCode );
44+ exec ('git describe --tags --abbrev=0 2>&1 ' , $ output , $ exitCode );
3545
3646 if ($ exitCode !== 0 ) {
37- $ this ->markTestSkipped ('Unable to determine the current version from git tags. ' );
47+ $ this ->markTestSkipped (sprintf (
48+ "Unable to get the latest git tag. \nOutput: %s " ,
49+ implode ("\n" , $ output ),
50+ ));
3851 }
3952
4053 // Current tag should already have the next patch docs done, so for testing purposes,
You can’t perform that action at this time.
0 commit comments