@@ -70,25 +70,17 @@ jobs:
7070 - name : " Generate matrix"
7171 id : generate_matrix
7272 run : |
73- # Use dynamic script to get WooCommerce versions (L-1 policy)
74- SCRIPT_RESULT=$( .github/scripts/generate-wc-matrix.sh )
73+ # Use simplified QIT script - QIT handles version resolution for stable/rc/beta
74+ SCRIPT_RESULT=$( .github/scripts/generate-qit- wc-matrix.sh )
7575
76- # Extract versions and metadata from JSON
77- L1_VERSION=$(echo "$SCRIPT_RESULT" | jq -r '.metadata.l1_version')
78- RC_VERSION=$(echo "$SCRIPT_RESULT" | jq -r '.metadata.rc_version')
79- BETA_VERSION=$(echo "$SCRIPT_RESULT" | jq -r '.metadata.beta_version')
80-
81- if [[ "$BETA_VERSION" == "null" ]]; then
82- BETA_VERSION=""
83- fi
76+ # Extract L-1 version and availability flags from JSON
77+ L1_VERSION=$(echo "$SCRIPT_RESULT" | jq -r '.l1_version')
78+ RC_AVAILABLE=$(echo "$SCRIPT_RESULT" | jq -r '.rc_available')
79+ BETA_AVAILABLE=$(echo "$SCRIPT_RESULT" | jq -r '.beta_available')
8480
8581 echo "Using L-1 version: $L1_VERSION" >&2
86- echo "Using RC version: $RC_VERSION" >&2
87- if [[ -n "$BETA_VERSION" ]]; then
88- echo "Using beta version: $BETA_VERSION" >&2
89- else
90- echo "No beta version available" >&2
91- fi
82+ echo "RC available: $RC_AVAILABLE" >&2
83+ echo "Beta available: $BETA_AVAILABLE" >&2
9284
9385 # Define common values to reduce repetition
9486 PHP_LEGACY="7.4"
@@ -107,37 +99,41 @@ jobs:
10799 MATRIX_ENTRIES+=("{\"woocommerce\":\"7.7.0\",\"php\":\"$PHP_LEGACY\",\"test_tag\":\"merchant subscriptions\",\"test_name\":\"subscriptions-merchant\"}")
108100 MATRIX_ENTRIES+=("{\"woocommerce\":\"7.7.0\",\"php\":\"$PHP_LEGACY\",\"test_tag\":\"shopper subscriptions\",\"test_name\":\"subscriptions-shopper\"}")
109101
110- # Add L-1 version with PHP 8.3
102+ # Add L-1 version with PHP 8.3 (QIT uses actual version number)
111103 MATRIX_ENTRIES+=("{\"woocommerce\":\"$L1_VERSION\",\"php\":\"$PHP_STABLE\",\"test_tag\":\"merchant\",\"test_name\":\"merchant\"}")
112104 MATRIX_ENTRIES+=("{\"woocommerce\":\"$L1_VERSION\",\"php\":\"$PHP_STABLE\",\"test_tag\":\"shopper\",\"test_name\":\"shopper\"}")
113105 MATRIX_ENTRIES+=("{\"woocommerce\":\"$L1_VERSION\",\"php\":\"$PHP_STABLE\",\"test_tag\":\"merchant subscriptions\",\"test_name\":\"subscriptions-merchant\"}")
114106 MATRIX_ENTRIES+=("{\"woocommerce\":\"$L1_VERSION\",\"php\":\"$PHP_STABLE\",\"test_tag\":\"shopper subscriptions\",\"test_name\":\"subscriptions-shopper\"}")
115107 MATRIX_ENTRIES+=("{\"woocommerce\":\"$L1_VERSION\",\"php\":\"$PHP_STABLE\",\"test_tag\":\"shopper blocks\",\"test_name\":\"blocks-shopper\"}")
116108
117- # Add latest with PHP 8.3
109+ # Add stable with PHP 8.3 (QIT keyword - resolves to latest stable)
118110 MATRIX_ENTRIES+=("{\"woocommerce\":\"stable\",\"php\":\"$PHP_STABLE\",\"test_tag\":\"merchant\",\"test_name\":\"merchant\"}")
119111 MATRIX_ENTRIES+=("{\"woocommerce\":\"stable\",\"php\":\"$PHP_STABLE\",\"test_tag\":\"shopper\",\"test_name\":\"shopper\"}")
120112 MATRIX_ENTRIES+=("{\"woocommerce\":\"stable\",\"php\":\"$PHP_STABLE\",\"test_tag\":\"merchant subscriptions\",\"test_name\":\"subscriptions-merchant\"}")
121113 MATRIX_ENTRIES+=("{\"woocommerce\":\"stable\",\"php\":\"$PHP_STABLE\",\"test_tag\":\"shopper subscriptions\",\"test_name\":\"subscriptions-shopper\"}")
122114 MATRIX_ENTRIES+=("{\"woocommerce\":\"stable\",\"php\":\"$PHP_STABLE\",\"test_tag\":\"shopper blocks\",\"test_name\":\"blocks-shopper\"}")
123115
124- # Add beta with PHP 8.3 (if available)
125- if [[ -n "$BETA_VERSION" ]]; then
126- MATRIX_ENTRIES+=("{\"woocommerce\":\"$BETA_VERSION\",\"php\":\"$PHP_STABLE\",\"test_tag\":\"merchant\",\"test_name\":\"merchant\"}")
127- MATRIX_ENTRIES+=("{\"woocommerce\":\"$BETA_VERSION\",\"php\":\"$PHP_STABLE\",\"test_tag\":\"shopper\",\"test_name\":\"shopper\"}")
128- MATRIX_ENTRIES+=("{\"woocommerce\":\"$BETA_VERSION\",\"php\":\"$PHP_STABLE\",\"test_tag\":\"merchant subscriptions\",\"test_name\":\"subscriptions-merchant\"}")
129- MATRIX_ENTRIES+=("{\"woocommerce\":\"$BETA_VERSION\",\"php\":\"$PHP_STABLE\",\"test_tag\":\"shopper subscriptions\",\"test_name\":\"subscriptions-shopper\"}")
130- MATRIX_ENTRIES+=("{\"woocommerce\":\"$BETA_VERSION\",\"php\":\"$PHP_STABLE\",\"test_tag\":\"shopper blocks\",\"test_name\":\"blocks-shopper\"}")
116+ # Add beta with PHP 8.3 (QIT keyword - only if available)
117+ if [[ "$BETA_AVAILABLE" == "true" ]]; then
118+ MATRIX_ENTRIES+=("{\"woocommerce\":\"beta\",\"php\":\"$PHP_STABLE\",\"test_tag\":\"merchant\",\"test_name\":\"merchant\"}")
119+ MATRIX_ENTRIES+=("{\"woocommerce\":\"beta\",\"php\":\"$PHP_STABLE\",\"test_tag\":\"shopper\",\"test_name\":\"shopper\"}")
120+ MATRIX_ENTRIES+=("{\"woocommerce\":\"beta\",\"php\":\"$PHP_STABLE\",\"test_tag\":\"merchant subscriptions\",\"test_name\":\"subscriptions-merchant\"}")
121+ MATRIX_ENTRIES+=("{\"woocommerce\":\"beta\",\"php\":\"$PHP_STABLE\",\"test_tag\":\"shopper subscriptions\",\"test_name\":\"subscriptions-shopper\"}")
122+ MATRIX_ENTRIES+=("{\"woocommerce\":\"beta\",\"php\":\"$PHP_STABLE\",\"test_tag\":\"shopper blocks\",\"test_name\":\"blocks-shopper\"}")
123+ echo "Including beta tests (QIT will resolve to latest beta)" >&2
124+ else
125+ echo "Skipping beta tests - no beta available" >&2
131126 fi
132127
133- # Add rc with PHP 8.4 (only if RC version is available)
134- if [[ -n "$RC_VERSION" && "$RC_VERSION" != "null" ]]; then
135- MATRIX_ENTRIES+=("{\"woocommerce\":\"$RC_VERSION\",\"php\":\"$PHP_LATEST\",\"test_tag\":\"merchant\",\"test_name\":\"merchant\"}")
136- MATRIX_ENTRIES+=("{\"woocommerce\":\"$RC_VERSION\",\"php\":\"$PHP_LATEST\",\"test_tag\":\"shopper\",\"test_name\":\"shopper\"}")
137- MATRIX_ENTRIES+=("{\"woocommerce\":\"$RC_VERSION\",\"php\":\"$PHP_LATEST\",\"test_tag\":\"merchant subscriptions\",\"test_name\":\"subscriptions-merchant\"}")
138- MATRIX_ENTRIES+=("{\"woocommerce\":\"$RC_VERSION\",\"php\":\"$PHP_LATEST\",\"test_tag\":\"shopper subscriptions\",\"test_name\":\"subscriptions-shopper\"}")
128+ # Add rc with PHP 8.4 (QIT keyword - only if available)
129+ if [[ "$RC_AVAILABLE" == "true" ]]; then
130+ MATRIX_ENTRIES+=("{\"woocommerce\":\"rc\",\"php\":\"$PHP_LATEST\",\"test_tag\":\"merchant\",\"test_name\":\"merchant\"}")
131+ MATRIX_ENTRIES+=("{\"woocommerce\":\"rc\",\"php\":\"$PHP_LATEST\",\"test_tag\":\"shopper\",\"test_name\":\"shopper\"}")
132+ MATRIX_ENTRIES+=("{\"woocommerce\":\"rc\",\"php\":\"$PHP_LATEST\",\"test_tag\":\"merchant subscriptions\",\"test_name\":\"subscriptions-merchant\"}")
133+ MATRIX_ENTRIES+=("{\"woocommerce\":\"rc\",\"php\":\"$PHP_LATEST\",\"test_tag\":\"shopper subscriptions\",\"test_name\":\"subscriptions-shopper\"}")
134+ echo "Including RC tests (QIT will resolve to latest RC)" >&2
139135 else
140- echo "No RC version available, skipping RC matrix entries " >&2
136+ echo "Skipping RC tests - no RC available " >&2
141137 fi
142138
143139 # Add WordPress nightly with WC latest and PHP 8.3 (match e2e-test.yml wp-nightly-tests)
0 commit comments