Skip to content
Open
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
99eea04
Update QIT E2E workflow to enhance testing matrix and add test tag input
mgascam Oct 8, 2025
46ca98f
Refactor QIT test execution path and configuration for improved clarity
mgascam Oct 8, 2025
2255600
Refactor QIT test tag handling to remove leading '@' symbol and impro…
mgascam Oct 8, 2025
b249b2a
Enhance QIT E2E workflow to include WordPress version options and exp…
mgascam Oct 8, 2025
f2314ea
Refactor QIT E2E test matrix to use space-separated tagg
mgascam Oct 8, 2025
aff51b4
Refactor QIT E2E test matrix to exclude specific tags for merchant an…
mgascam Oct 8, 2025
b06b724
Refactor QIT E2E test matrix to use space-separated tags for merchant…
mgascam Oct 8, 2025
7ed2b16
Enhance QIT E2E workflow to include first run and retry logic for fai…
mgascam Oct 8, 2025
69a4482
Refactor QIT E2E workflow to improve test matrix generation and strea…
mgascam Oct 8, 2025
afa3df9
Temporarily disable develop and trunk branch runs in QIT E2E workflow…
mgascam Oct 9, 2025
d36cd39
Refactor QIT E2E workflow to comment out specific matrix entries and …
mgascam Oct 9, 2025
7da979d
Refactor QIT E2E workflow to streamline test selection logic and disa…
mgascam Oct 9, 2025
f130493
Refactor QIT E2E workflow to enhance test selection logic using tags,…
mgascam Oct 9, 2025
fcb24d3
Fix grep-invert
mgascam Oct 9, 2025
549eb16
Fix failed specs extraction
mgascam Oct 9, 2025
978c756
Disable retries for failed specs
mgascam Oct 9, 2025
4421d08
chore: tickle PR view
mgascam Oct 9, 2025
ee2be8f
Fix grep-invert error
mgascam Oct 9, 2025
64c22c0
Refactor QIT test retries to use grep pattern for failed specs
mgascam Oct 10, 2025
70ea5cb
Refactor QIT results handling to improve error messages and file sear…
mgascam Oct 10, 2025
9a36f1c
Remove branch reference for QIT E2E workflow enhancements to streamli…
mgascam Oct 10, 2025
1e5fc3b
Enhance QIT test execution with error handling and result verification
mgascam Oct 10, 2025
7b6fc13
Refactor QIT E2E workflow to separate pull request and scheduled runs
mgascam Oct 10, 2025
fca93fd
Restore QIT download and authentication
mgascam Oct 10, 2025
3e75a48
Update QIT E2E workflow to use stable version for compatibility testing
mgascam Oct 10, 2025
6ac3f13
Add QIT script for WooCommerce version matrix and update workflows to…
mgascam Oct 10, 2025
c763176
Add --no_upload_report option to QIT E2E tests in CI
mgascam Oct 10, 2025
d0d55aa
Merge branch 'dev/qit-e2e-subscriptions-specs-migration' into dev/qit…
mgascam Oct 10, 2025
a208304
Add Playwright test results upload step to E2E workflows
mgascam Nov 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 93 additions & 0 deletions .github/scripts/generate-qit-wc-matrix.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
#!/bin/bash

# Simplified script for QIT WooCommerce version matrix
# QIT handles version resolution for stable, rc, beta, nightly keywords
# We only need to fetch L-1 version for backward compatibility testing

set -e

# Function to get the latest WooCommerce version from WordPress.org API
get_latest_wc_version() {
curl -s https://api.wordpress.org/plugins/info/1.0/woocommerce.json | jq -r '.version'
}

# Function to get the latest stable version for a specific major version
get_latest_stable_for_major() {
local major_version=$1
curl -s https://api.wordpress.org/plugins/info/1.0/woocommerce.json | \
jq -r --arg major "$major_version" '.versions | with_entries(select(.key | startswith($major + ".") and (contains("-") | not))) | keys | sort_by( . | split(".") | map(tonumber) ) | last'
}

# Function to get the L-1 version (previous major version's latest stable)
get_l1_version() {
local latest_version=$1
local major_version=$(echo "$latest_version" | cut -d. -f1)
local l1_major=$((major_version - 1))
get_latest_stable_for_major "$l1_major"
}

# Get the latest WooCommerce version
echo "Fetching latest WooCommerce version..." >&2
LATEST_WC_VERSION=$(get_latest_wc_version)
echo "Latest WC version: $LATEST_WC_VERSION" >&2

# Get the L-1 version (we need the actual version number for this)
L1_VERSION=$(get_l1_version "$LATEST_WC_VERSION")
echo "L-1 version: $L1_VERSION" >&2

# Validate L-1 version
if [[ -z "$L1_VERSION" || "$L1_VERSION" == "null" ]]; then
echo "Error: Could not extract L-1 version" >&2
exit 1
fi

if [[ ! "$L1_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Error: Invalid L-1 version: $L1_VERSION" >&2
exit 1
fi

# Check if RC and beta are available (for metadata only)
# QIT will handle the actual version resolution
RC_AVAILABLE="false"
BETA_AVAILABLE="false"

LATEST_RC=$(curl -s https://api.wordpress.org/plugins/info/1.0/woocommerce.json | \
jq -r '.versions | with_entries(select(.key|match("rc";"i"))) | keys | sort_by( . | split("-")[0] | split(".") | map(tonumber) ) | last')

if [[ -n "$LATEST_RC" && "$LATEST_RC" != "null" ]]; then
RC_BASE="${LATEST_RC%%-*}"
HIGHEST=$(printf '%s\n%s\n' "$RC_BASE" "$LATEST_WC_VERSION" | sort -V | tail -n1)
if [[ "$HIGHEST" == "$RC_BASE" && "$RC_BASE" != "$LATEST_WC_VERSION" ]]; then
RC_AVAILABLE="true"
echo "RC available: $LATEST_RC" >&2
else
echo "RC not applicable (stable $LATEST_WC_VERSION already released)" >&2
fi
else
echo "No RC version available" >&2
fi

LATEST_BETA=$(curl -s https://api.wordpress.org/plugins/info/1.0/woocommerce.json | \
jq -r --arg major "$(echo "$LATEST_WC_VERSION" | cut -d. -f1)" \
'.versions | with_entries(select(.key | startswith($major + ".") and contains("beta"))) | keys | sort_by( . | split("-")[0] | split(".") | map(tonumber) ) | last')

if [[ -n "$LATEST_BETA" && "$LATEST_BETA" != "null" ]]; then
BETA_AVAILABLE="true"
echo "Beta available: $LATEST_BETA" >&2
else
echo "No beta version available" >&2
fi

# Output JSON with L-1 version and availability flags
# QIT workflows will use keywords (stable, rc, beta) and check availability flags
RESULT=$(jq -n \
--arg l1_version "$L1_VERSION" \
--arg rc_available "$RC_AVAILABLE" \
--arg beta_available "$BETA_AVAILABLE" \
'{
l1_version: $l1_version,
rc_available: ($rc_available == "true"),
beta_available: ($beta_available == "true")
}')

echo "$RESULT"
Loading
Loading