Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
254cf05
Create Appium baseline tests
bpolgar-swo Nov 18, 2025
57cb2c5
Fix appium testing workflow
bpolgar-swo Nov 18, 2025
3a2b512
Pipeline fix and Reportportal integration prep
bpolgar-swo Nov 19, 2025
01901c3
Merge branch 'main' into feature/MPT-15220_appium_tests
bpolgar-swo Nov 19, 2025
c950f18
Linting fixes and main update
bpolgar-swo Nov 19, 2025
f9c107d
More linting changes
bpolgar-swo Nov 19, 2025
6ad6596
Add pull_request trigger to test workflow
bpolgar-swo Nov 20, 2025
366f8d9
moved workflow inputs to env
bpolgar-swo Nov 20, 2025
1142fca
add restore node cache step to workflow test job
bpolgar-swo Nov 20, 2025
f7825d9
setting template workflow job default working dir
bpolgar-swo Nov 20, 2025
2160dc3
updating template workflow node cache path
bpolgar-swo Nov 20, 2025
6cd4fe9
updated template workflow node cache path
bpolgar-swo Nov 20, 2025
621ca40
worflow update XCUITest step
bpolgar-swo Nov 20, 2025
da438fe
changed template workflow appium version
bpolgar-swo Nov 20, 2025
a82bf8c
test workflow app path change
bpolgar-swo Nov 20, 2025
ec73cf6
defined outputs for test workflow
bpolgar-swo Nov 20, 2025
0c50902
template workflow app_path fix
bpolgar-swo Nov 20, 2025
b405663
test workflow input rename
bpolgar-swo Nov 20, 2025
53634ec
workflow diagnostic step
bpolgar-swo Nov 20, 2025
18e9324
template workflow debug
bpolgar-swo Nov 20, 2025
a1b08bd
workflow change to download app archive
bpolgar-swo Nov 20, 2025
79d66c2
workflow app url update
bpolgar-swo Nov 20, 2025
f7c3c11
workflow artifact changes
bpolgar-swo Nov 20, 2025
844ccef
moved download step to caller workflow from template
bpolgar-swo Nov 21, 2025
4e0cb43
editing test workflow test-ios fields
bpolgar-swo Nov 21, 2025
a3ab09c
workflow input/env fix
bpolgar-swo Nov 21, 2025
0a9214f
changed workflow download file name
bpolgar-swo Nov 21, 2025
3124d29
fixed workflow upload step to upload folder
bpolgar-swo Nov 21, 2025
20c4912
changed workflow to build for simulator
bpolgar-swo Nov 21, 2025
afd13ad
workflow artifact name change on upload
bpolgar-swo Nov 21, 2025
e09e6e6
workflow app name
bpolgar-swo Nov 21, 2025
478aba7
disabled workflow upload/download
bpolgar-swo Nov 21, 2025
292a67a
app path change for workflow
bpolgar-swo Nov 21, 2025
4770672
set env for workflow job verify-and-install-ios
bpolgar-swo Nov 21, 2025
5bf0106
re-add workflow up and download
bpolgar-swo Nov 21, 2025
e9d9ba4
workflow upload path fix
bpolgar-swo Nov 21, 2025
d8fe418
workflow change
bpolgar-swo Nov 21, 2025
2e3758f
workflow upload fixes
bpolgar-swo Nov 21, 2025
de8b721
workflow simulator name change
bpolgar-swo Nov 21, 2025
52f53ae
workflow change for iphone udid
bpolgar-swo Nov 21, 2025
a224dde
workflow change to find correct simulator
bpolgar-swo Nov 24, 2025
b3b102f
workflow cache pathing change
bpolgar-swo Nov 24, 2025
474ab29
workflow XCUITest update
bpolgar-swo Nov 24, 2025
bc2600c
workflow simplified xcuitest install
bpolgar-swo Nov 24, 2025
1adfc7b
workflow update appium discover time
bpolgar-swo Nov 24, 2025
47bb6e0
workflow fix for cache pathing
bpolgar-swo Nov 24, 2025
2abee2a
wdio conf changed to use appium through hostname
bpolgar-swo Nov 24, 2025
fda8b8f
template workflow update to log variables
bpolgar-swo Nov 24, 2025
a5d744f
template workflow update
bpolgar-swo Nov 24, 2025
ca73a09
added wdio port int parsing from env variable
bpolgar-swo Nov 25, 2025
e4e99fd
appium url change
bpolgar-swo Nov 25, 2025
d8c30bb
template workflow and wdio configuration updates
bpolgar-swo Nov 25, 2025
0c435c7
workflow guards for simulator run
bpolgar-swo Nov 25, 2025
7e516bf
moved install app to template workflow
bpolgar-swo Nov 25, 2025
1f6001a
workflow fixes for templates
bpolgar-swo Nov 25, 2025
8b7e63a
workflow timeout fixes
bpolgar-swo Nov 25, 2025
b00ac3e
install template change
bpolgar-swo Nov 25, 2025
0cd5cfb
workflow changes moving templates under the same job
bpolgar-swo Nov 25, 2025
487cdbe
changing templates to step based
bpolgar-swo Nov 25, 2025
331554f
step template workflow changes
bpolgar-swo Nov 26, 2025
a05f5fa
added testing readme
bpolgar-swo Nov 26, 2025
c204099
workflow debug trigger
bpolgar-swo Nov 26, 2025
6e06c34
simulator hanging fix
bpolgar-swo Nov 26, 2025
f4b569b
Fix Appium WebDriver connection using verified network URL
bpolgar-swo Nov 26, 2025
5dda0ee
appium url workflow fix
bpolgar-swo Nov 26, 2025
19dbee0
Add debugging output for zip path resolution
bpolgar-swo Nov 26, 2025
fc8e98f
Fix release step working directory to match other build steps
bpolgar-swo Nov 26, 2025
6882ca3
Fix workflow permissions for release creation
bpolgar-swo Nov 26, 2025
bcd19e4
workflow updates for simulator stability
bpolgar-swo Nov 26, 2025
a3b5b16
workflow updates to ensure simulator availability
bpolgar-swo Nov 26, 2025
5140b4b
workflow updates
bpolgar-swo Nov 26, 2025
4584b1d
workflow default switched to release
bpolgar-swo Nov 26, 2025
95c0d81
forcing release default for workflow
bpolgar-swo Nov 26, 2025
11efd74
changed download_url default for example workflow
bpolgar-swo Nov 26, 2025
d220f85
added testing script and workflow changes
bpolgar-swo Nov 27, 2025
7881c94
feat: enhance iOS testing workflow with skip-build option and remove …
bpolgar-swo Nov 27, 2025
d46b3ba
resolve merge conflicts: include both Appium testing deps and axios
bpolgar-swo Nov 27, 2025
381bab1
refactor: move testing dependencies to devDependencies
bpolgar-swo Nov 27, 2025
3dd8090
PR comments resolution
bpolgar-swo Nov 27, 2025
4604716
fix: add missing @types/node dependency for CI compatibility
bpolgar-swo Nov 27, 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
300 changes: 300 additions & 0 deletions .github/actions/ios-install/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,300 @@
name: 'iOS App Install and Setup'
description: 'Download, install, and setup iOS app on simulator'
inputs:
artifact_name:
description: 'Name of the iOS app artifact to download'
required: false
download_url:
description: 'Direct download URL for the iOS app bundle'
required: false
ios_version:
description: 'iOS version for simulator'
required: false
default: '26.0'
device_name:
description: 'iOS simulator device name'
required: false
default: 'iPhone 16'
outputs:
device_udid:
description: 'UUID of the booted iOS simulator'
value: ${{ steps.boot-simulator.outputs.device_udid }}
bundle_id:
description: 'Bundle ID of the installed app'
value: ${{ steps.install-app.outputs.bundle_id }}
app_path:
description: 'Path to the installed app bundle'
value: ${{ steps.verify-app.outputs.app_path }}

runs:
using: 'composite'
steps:
- name: Download iOS app from artifact
if: inputs.artifact_name != ''
uses: actions/download-artifact@v4
with:
name: ${{ inputs.artifact_name }}
path: ./downloaded-app

- name: Download iOS app from URL
if: inputs.download_url != ''
shell: bash
run: |
echo "📥 Downloading iOS app from URL..."
echo "URL: ${{ inputs.download_url }}"

# Create download directory
mkdir -p ./downloaded-app

# Download the file
curl -L -o ./downloaded-app/app_bundle.zip "${{ inputs.download_url }}"

# Verify download
if [ ! -f "./downloaded-app/app_bundle.zip" ]; then
echo "❌ ERROR: Download failed"
exit 1
fi

# Check file size
FILE_SIZE=$(stat -f%z "./downloaded-app/app_bundle.zip" 2>/dev/null || stat -c%s "./downloaded-app/app_bundle.zip")
echo "✅ Downloaded app bundle (${FILE_SIZE} bytes)"

- name: Verify download method
shell: bash
run: |
if [ -z "${{ inputs.artifact_name }}" ] && [ -z "${{ inputs.download_url }}" ]; then
echo "❌ ERROR: Either artifact_name or download_url must be provided"
exit 1
fi

if [ -n "${{ inputs.artifact_name }}" ] && [ -n "${{ inputs.download_url }}" ]; then
echo "⚠️ WARNING: Both artifact_name and download_url provided, using artifact_name"
fi

- name: Unzip app bundle
shell: bash
run: |
echo "📦 Extracting app bundle..."

# Find and extract the zip file
if [ -f "./downloaded-app/app_bundle.zip" ]; then
unzip "./downloaded-app/app_bundle.zip" -d ./downloaded-app/
echo "✅ App bundle extracted"
else
echo "❌ ERROR: app_bundle.zip not found in ./downloaded-app"
echo "Contents of ./downloaded-app:"
ls -la ./downloaded-app/
exit 1
fi

- name: Verify app bundle
id: verify-app
shell: bash
run: |
echo "🔍 Verifying .app bundle..."

APP_PATH=$(find ./downloaded-app -name "*.app" -type d -maxdepth 2 | head -n 1)

echo "Contents of ./downloaded-app:"
ls -la ./downloaded-app/

if [ -z "$APP_PATH" ]; then
echo "❌ ERROR: .app bundle not found"
echo "Searching for .app files:"
find ./downloaded-app -name "*.app" -type d
exit 1
fi

if [ ! -f "$APP_PATH/Info.plist" ]; then
echo "❌ ERROR: Invalid .app bundle - missing Info.plist"
exit 1
fi

# Extract bundle ID for verification
BUNDLE_ID=$(/usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" "$APP_PATH/Info.plist")
echo "📱 Found valid app bundle: $(basename "$APP_PATH")"
echo "📋 Bundle ID: $BUNDLE_ID"

echo "app_path=$APP_PATH" >> $GITHUB_OUTPUT
echo "APP_PATH=$APP_PATH" >> $GITHUB_ENV
echo "VERIFIED_BUNDLE_ID=$BUNDLE_ID" >> $GITHUB_ENV

- name: List available iOS simulators
shell: bash
run: |
echo "📱 Available iOS Simulators:"
xcrun simctl list devices available

- name: Find and boot iOS Simulator
id: boot-simulator
shell: bash
run: |
set -e
DEVICE_NAME="${{ inputs.device_name }}"
PLATFORM_VERSION="${{ inputs.ios_version }}"

echo "🔍 Looking for: $DEVICE_NAME with iOS $PLATFORM_VERSION"

# Use Python with JSON output for reliable parsing
UDID=$(xcrun simctl list devices available -j | python3 -c "
import json
import sys

data = json.load(sys.stdin)
target_device = '$DEVICE_NAME'
target_version = '$PLATFORM_VERSION'

# Format the version for comparison (e.g., '26.0' -> 'iOS-26-0')
formatted_version = 'iOS-' + target_version.replace(' ', '-').replace('.', '-')

for runtime_key, devices in data.get('devices', {}).items():
# Extract and format the runtime version from the key
# Runtime keys look like: 'com.apple.CoreSimulator.SimRuntime.iOS-26-0'
if formatted_version in runtime_key:
for device in devices:
if device.get('name') == target_device and device.get('isAvailable', False):
print(device['udid'])
sys.exit(0)

# If we get here, device wasn't found
sys.exit(1)
" 2>/dev/null)

if [ -z "$UDID" ]; then
echo "❌ ERROR: Could not find $DEVICE_NAME with iOS $PLATFORM_VERSION"
echo ""
echo "Available simulators:"
xcrun simctl list devices available
echo ""
echo "Debugging - Runtime keys:"
xcrun simctl list devices available -j | python3 -c "
import json
import sys
data = json.load(sys.stdin)
for key in data.get('devices', {}).keys():
print(key)
"
exit 1
fi

echo "DEVICE_UDID=$UDID" >> $GITHUB_ENV
echo "device_udid=$UDID" >> $GITHUB_OUTPUT
echo "✅ Found simulator: $DEVICE_NAME ($UDID)"

# Boot the simulator with timeout protection
echo "🚀 Booting simulator..."
xcrun simctl boot $UDID 2>/dev/null || echo "Simulator already booted or boot command completed"

# Wait for boot to complete with timeout and fallback strategy
echo "⏳ Waiting for simulator to boot (timeout: 180 seconds)..."

BOOT_TIMEOUT=180
BOOT_SUCCESS=false

for i in $(seq 1 $BOOT_TIMEOUT); do
# Check if simulator is booted
SIMULATOR_STATUS=$(xcrun simctl list devices | grep "$UDID" | head -1)
if echo "$SIMULATOR_STATUS" | grep -q "(Booted)"; then
BOOT_SUCCESS=true
echo "✅ Simulator booted successfully after ${i} seconds"
break
fi

# Progress indicator every 10 seconds
if [ $((i % 10)) -eq 0 ]; then
echo "⏳ Still waiting... (${i}/${BOOT_TIMEOUT} seconds)"
echo "Current status: $SIMULATOR_STATUS"
fi

sleep 1
done

if [ "$BOOT_SUCCESS" = false ]; then
echo "❌ ERROR: Simulator failed to boot within $BOOT_TIMEOUT seconds"
echo "Final status: $(xcrun simctl list devices | grep "$UDID" | head -1)"
echo ""
echo "🔧 Attempting recovery..."

# Try to shutdown and reboot once
echo "🔄 Shutting down simulator..."
xcrun simctl shutdown $UDID || true
sleep 5

echo "🚀 Attempting second boot..."
xcrun simctl boot $UDID

# Give it one more chance with shorter timeout
echo "⏳ Final boot attempt (60 seconds timeout)..."
FINAL_TIMEOUT=60
FINAL_SUCCESS=false

for i in $(seq 1 $FINAL_TIMEOUT); do
SIMULATOR_STATUS=$(xcrun simctl list devices | grep "$UDID" | head -1)
if echo "$SIMULATOR_STATUS" | grep -q "(Booted)"; then
FINAL_SUCCESS=true
echo "✅ Simulator recovered and booted after ${i} seconds"
break
fi
sleep 1
done

if [ "$FINAL_SUCCESS" = false ]; then
echo "❌ FATAL: Simulator boot failed completely"
echo "This might be a CI environment issue with iOS simulators"
exit 1
fi
fi

# Double-check simulator status and ensure it's ready for testing
echo "🔍 Final verification that simulator is ready..."
SIMULATOR_STATUS=$(xcrun simctl list devices | grep "$UDID" | head -1)
echo "Simulator status: $SIMULATOR_STATUS"

if echo "$SIMULATOR_STATUS" | grep -q "(Booted)"; then
echo "✅ Simulator is booted and ready for testing"
else
echo "❌ ERROR: Simulator failed to reach booted state"
echo "Current status: $SIMULATOR_STATUS"
exit 1
fi

- name: Install app on simulator
id: install-app
shell: bash
run: |
echo "📲 Installing app on simulator..."
echo "Device UDID: ${{ env.DEVICE_UDID }}"
echo "App path: ${{ env.APP_PATH }}"

# Install the app
xcrun simctl install "${{ env.DEVICE_UDID }}" "${{ env.APP_PATH }}"

# Extract and output bundle ID
BUNDLE_ID=$(/usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" "${{ env.APP_PATH }}/Info.plist")
echo "BUNDLE_ID=${BUNDLE_ID}" >> $GITHUB_ENV
echo "bundle_id=${BUNDLE_ID}" >> $GITHUB_OUTPUT

echo "✅ App installed successfully"
echo "📋 Bundle ID: ${BUNDLE_ID}"

- name: Launch and verify app
shell: bash
run: |
echo "🚀 Launching app..."
xcrun simctl launch "${{ env.DEVICE_UDID }}" "${{ env.BUNDLE_ID }}"

echo "⏳ Waiting for app to initialize..."
sleep 5

# Verify app is installed and accessible for testing
echo "🔍 Final app verification before testing..."
if xcrun simctl listapps "${{ env.DEVICE_UDID }}" | grep -q "${{ env.BUNDLE_ID }}"; then
echo "✅ App ${{ env.BUNDLE_ID }} is installed and available for Appium testing"
else
echo "❌ ERROR: App not found after installation"
echo "Installed apps:"
xcrun simctl listapps "${{ env.DEVICE_UDID }}"
exit 1
fi

echo "🎯 App launched successfully and ready for testing"
Loading