[codex] Add Zoho support ticket flow #362
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Maestro Test iOS | |
| env: | |
| # Self-hosted runners persist /nix/store; avoid stale Magic Nix Cache hooks/proxies. | |
| NIX_CONFIG: | | |
| post-build-hook = | |
| extra-substituters = | |
| substituters = https://cache.nixos.org/ | |
| on: | |
| pull_request: | |
| paths: | |
| - "client/**" | |
| - "scripts/**" | |
| - "package.json" | |
| - "bun.lock" | |
| - ".github/workflows/**" | |
| - "!**/*.md" | |
| jobs: | |
| build-release-ios: | |
| name: Build iOS Release App | |
| uses: ./.github/workflows/noah-build-release-ios.yml | |
| secrets: inherit | |
| maestro-test-ios: | |
| name: Maestro Test iOS | |
| needs: build-release-ios | |
| runs-on: macOS | |
| timeout-minutes: 15 | |
| permissions: | |
| checks: read | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| steps: | |
| - name: π Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: π₯ Download iOS app artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: ${{ needs.build-release-ios.outputs.artifact_name }} | |
| path: ios-release-build | |
| - name: ποΈ Decompress iOS app | |
| run: | | |
| cd ios-release-build | |
| unzip ios-release.zip | |
| rm ios-release.zip | |
| - name: π§ Setup Regtest Environment | |
| run: cd scripts && docker-compose pull && docker-compose build && ./ark-dev.sh setup-everything | |
| - name: π± Boot iOS Simulator (iPhone 17 Pro) | |
| run: | | |
| DEVICE_ID=$(xcrun simctl list devices available | grep "iPhone 17 Pro" | head -n 1 | awk -F "[()]" '{print $2}') | |
| if [ -z "$DEVICE_ID" ]; then | |
| echo "No available simulator found for the criteria." | |
| exit 1 | |
| fi | |
| echo "Found simulator with DEVICE_ID=$DEVICE_ID" | |
| # Check if simulator is already booted | |
| STATUS=$(xcrun simctl list | grep "$DEVICE_ID" | grep "(Booted)" || echo "") | |
| if [[ -n "$STATUS" ]]; then | |
| echo "Simulator is already booted. Shutting down first..." | |
| xcrun simctl shutdown "$DEVICE_ID" || true | |
| sleep 2 | |
| fi | |
| echo "Booting iPhone 17 Pro simulator with DEVICE_ID=$DEVICE_ID..." | |
| xcrun simctl boot "$DEVICE_ID" | |
| TIMEOUT=120 | |
| START_TIME=$(date +%s) | |
| echo "Waiting for simulator to boot..." | |
| while true; do | |
| CURRENT_TIME=$(date +%s) | |
| ELAPSED_TIME=$((CURRENT_TIME - START_TIME)) | |
| if [ $ELAPSED_TIME -ge $TIMEOUT ]; then | |
| echo "Timeout: simulator failed to boot for $TIMEOUT seconds." | |
| exit 1 | |
| fi | |
| STATUS=$(xcrun simctl list | grep "$DEVICE_ID" | grep "(Booted)") | |
| if [[ -n "$STATUS" ]]; then | |
| echo "Simulator is booted!" | |
| break | |
| else | |
| echo "Still waiting for the simulator to boot..." | |
| sleep 5 | |
| fi | |
| done | |
| - name: π§ͺ Run Maestro tests | |
| run: nix develop .# --command bash -c "xcrun simctl install booted ios-release-build/ios-release.app && bun client maestro:test" | |
| env: | |
| MAESTRO_DRIVER_STARTUP_TIMEOUT: 120000 | |
| - name: π§Ή Shutdown and erase simulator | |
| if: always() | |
| run: | | |
| echo "Getting booted simulator UDID..." | |
| DEVICE_UDID=$(xcrun simctl list devices | grep "(Booted)" | awk -F '[()]' '{print $2}' | head -n 1) | |
| if [ -n "$DEVICE_UDID" ]; then | |
| echo "Shutting down simulator: $DEVICE_UDID" | |
| if xcrun simctl shutdown "$DEVICE_UDID" 2>&1; then | |
| echo "β Shutdown command executed" | |
| else | |
| echo "β Warning: Shutdown command failed" | |
| fi | |
| # Verify shutdown | |
| sleep 2 | |
| SHUTDOWN_STATUS=$(xcrun simctl list devices | grep "$DEVICE_UDID" | grep "(Shutdown)" || echo "") | |
| if [[ -n "$SHUTDOWN_STATUS" ]]; then | |
| echo "β Simulator is now in Shutdown state" | |
| else | |
| echo "β Warning: Simulator may not be in Shutdown state" | |
| fi | |
| echo "Erasing simulator to clear all app data: $DEVICE_UDID" | |
| if xcrun simctl erase "$DEVICE_UDID" 2>&1; then | |
| echo "β Erase command executed successfully" | |
| else | |
| echo "β Warning: Erase command failed" | |
| fi | |
| else | |
| echo "No booted simulator found" | |
| fi | |
| - name: π§Ή Teardown Regtest Environment | |
| if: always() | |
| run: ./scripts/ark-dev.sh down | |
| - name: π€ Store debug output if failed | |
| if: failure() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: maestro-debug-output-ios | |
| path: client/maestro-debug-output/**/* | |
| include-hidden-files: true | |
| overwrite: true | |
| maestro_test_gate: | |
| name: Maestro Test iOS Gate | |
| runs-on: ubuntu-latest | |
| needs: maestro-test-ios | |
| if: always() | |
| steps: | |
| - name: β Gate | |
| run: | | |
| if [[ "${{ needs.maestro-test-ios.result }}" == "success" || "${{ needs.maestro-test-ios.result }}" == "skipped" ]]; then | |
| echo "Maestro tests passed or skipped" | |
| exit 0 | |
| else | |
| echo "Maestro tests failed" | |
| exit 1 | |
| fi |