Skip to content

Commit b305aa8

Browse files
authored
Test
1 parent 8f2e0b8 commit b305aa8

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/wp-compatibility-test.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,14 @@ jobs:
783783
$this->assertTrue(defined('SCG_PLUGIN_VERSION'), 'Plugin version constant should be defined');
784784
$this->assertTrue(defined('SCG_PLUGIN_URL'), 'Plugin URL constant should be defined');
785785
$this->assertTrue(defined('SCG_PLUGIN_PATH'), 'Plugin path constant should be defined');
786-
$this->assertEquals('1.4.0', SCG_PLUGIN_VERSION, 'Plugin version should match expected version');
786+
787+
// Extract version from plugin header dynamically to test against latest commit
788+
$plugin_file = dirname( dirname( __FILE__ ) ) . '/free-gift-bulk-coupon-generator.php';
789+
$plugin_data = get_file_data( $plugin_file, array( 'Version' => 'Version' ) );
790+
$expected_version = $plugin_data['Version'];
791+
792+
$this->assertNotEmpty($expected_version, 'Plugin header should contain version');
793+
$this->assertEquals($expected_version, SCG_PLUGIN_VERSION, 'Plugin version constant should match header version in latest commit');
787794
}
788795
789796
public function test_plugin_instance() {

0 commit comments

Comments
 (0)