Repository navigation
Improve Depot test workflow: diagnostics, filter, timeout #720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -17,6 +17,14 @@ on: | |||||||||||||||||||||||||||||||||||||||||||
| required: false | ||||||||||||||||||||||||||||||||||||||||||||
| default: false | ||||||||||||||||||||||||||||||||||||||||||||
| type: boolean | ||||||||||||||||||||||||||||||||||||||||||||
| test_filter: | ||||||||||||||||||||||||||||||||||||||||||||
| description: "Run specific UI test class (e.g. UpdatePillUITests) or empty for all" | ||||||||||||||||||||||||||||||||||||||||||||
| required: false | ||||||||||||||||||||||||||||||||||||||||||||
| default: "" | ||||||||||||||||||||||||||||||||||||||||||||
| test_timeout: | ||||||||||||||||||||||||||||||||||||||||||||
| description: "Per-test timeout in seconds (default: 120)" | ||||||||||||||||||||||||||||||||||||||||||||
| required: false | ||||||||||||||||||||||||||||||||||||||||||||
| default: "120" | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||||||||||||
| tests: | ||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -74,6 +82,18 @@ jobs: | |||||||||||||||||||||||||||||||||||||||||||
| rm GhosttyKit.xcframework.tar.gz | ||||||||||||||||||||||||||||||||||||||||||||
| test -d GhosttyKit.xcframework | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| - name: Display diagnostics | ||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||
| echo "=== Screen resolution ===" | ||||||||||||||||||||||||||||||||||||||||||||
| system_profiler SPDisplaysDataType 2>/dev/null || echo "No display info available" | ||||||||||||||||||||||||||||||||||||||||||||
| echo "" | ||||||||||||||||||||||||||||||||||||||||||||
| echo "=== Window server ===" | ||||||||||||||||||||||||||||||||||||||||||||
| /usr/sbin/system_profiler SPSoftwareDataType | grep -i "boot mode" || true | ||||||||||||||||||||||||||||||||||||||||||||
| echo "" | ||||||||||||||||||||||||||||||||||||||||||||
| echo "=== Accessibility permissions ===" | ||||||||||||||||||||||||||||||||||||||||||||
| tccutil reset Accessibility 2>/dev/null || true | ||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
In Useful? React with 👍 / 👎. |
||||||||||||||||||||||||||||||||||||||||||||
| echo "Accessibility reset attempted" | ||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+85
to
+95
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: cat -n .github/workflows/test-depot.yml | head -100 | tail -20Repository: manaflow-ai/cmux Length of output: 951 🏁 Script executed: # Get the exact section around lines 85-95
sed -n '75,100p' .github/workflows/test-depot.ymlRepository: manaflow-ai/cmux Length of output: 1059 🏁 Script executed: # Check if there are other steps in the same job that might use UI automation
rg -n "ui|UI|accessibility|Accessibility|automation|screenshot|xcode" .github/workflows/test-depot.yml -iRepository: manaflow-ai/cmux Length of output: 1927 Keep diagnostics read-only; remove Accessibility reset. The Suggested patch - name: Display diagnostics
run: |
echo "=== Screen resolution ==="
system_profiler SPDisplaysDataType 2>/dev/null || echo "No display info available"
echo ""
echo "=== Window server ==="
/usr/sbin/system_profiler SPSoftwareDataType | grep -i "boot mode" || true
echo ""
- echo "=== Accessibility permissions ==="
- tccutil reset Accessibility 2>/dev/null || true
- echo "Accessibility reset attempted"
+ echo "=== Accessibility diagnostics ==="
+ echo "Skipping TCC reset in diagnostics step to avoid mutating test environment"📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| - name: Clean DerivedData | ||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||
| rm -rf ~/Library/Developer/Xcode/DerivedData/GhosttyTabs-* | ||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -142,11 +162,23 @@ jobs: | |||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| - name: Run UI tests | ||||||||||||||||||||||||||||||||||||||||||||
| if: ${{ !inputs.skip_ui_tests }} | ||||||||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||||||||
| TEST_FILTER: ${{ inputs.test_filter }} | ||||||||||||||||||||||||||||||||||||||||||||
| TEST_TIMEOUT: ${{ inputs.test_timeout || '120' }} | ||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||
| set -euo pipefail | ||||||||||||||||||||||||||||||||||||||||||||
| SOURCE_PACKAGES_DIR="$PWD/.ci-source-packages" | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| # Build the -only-testing argument | ||||||||||||||||||||||||||||||||||||||||||||
| if [ -n "$TEST_FILTER" ]; then | ||||||||||||||||||||||||||||||||||||||||||||
| ONLY_TESTING="-only-testing:cmuxUITests/$TEST_FILTER" | ||||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||||
| ONLY_TESTING="-only-testing:cmuxUITests" | ||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| xcodebuild -project GhosttyTabs.xcodeproj -scheme cmux -configuration Debug \ | ||||||||||||||||||||||||||||||||||||||||||||
| -clonedSourcePackagesDirPath "$SOURCE_PACKAGES_DIR" \ | ||||||||||||||||||||||||||||||||||||||||||||
| -disableAutomaticPackageResolution \ | ||||||||||||||||||||||||||||||||||||||||||||
| -destination "platform=macOS" \ | ||||||||||||||||||||||||||||||||||||||||||||
| -only-testing:cmuxUITests test | ||||||||||||||||||||||||||||||||||||||||||||
| -maximum-test-execution-time-allowance "$TEST_TIMEOUT" \ | ||||||||||||||||||||||||||||||||||||||||||||
| $ONLY_TESTING test | ||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+173
to
+184
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: cat -n .github/workflows/test-depot.yml | sed -n '170,190p'Repository: manaflow-ai/cmux Length of output: 803 🏁 Script executed: rg -n 'TEST_FILTER' .github/workflows/test-depot.ymlRepository: manaflow-ai/cmux Length of output: 227 🏁 Script executed: head -100 .github/workflows/test-depot.yml | rg -n 'inputs|test_filter|on:'Repository: manaflow-ai/cmux Length of output: 528 🏁 Script executed: head -30 .github/workflows/test-depot.ymlRepository: manaflow-ai/cmux Length of output: 820 Quote The Suggested patch xcodebuild -project GhosttyTabs.xcodeproj -scheme cmux -configuration Debug \
-clonedSourcePackagesDirPath "$SOURCE_PACKAGES_DIR" \
-disableAutomaticPackageResolution \
-destination "platform=macOS" \
-maximum-test-execution-time-allowance "$TEST_TIMEOUT" \
- $ONLY_TESTING test
+ "$ONLY_TESTING" test🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
# Read the relevant sections of the test-depot.yml file head -n 35 .github/workflows/test-depot.ymlRepository: manaflow-ai/cmux
Length of output: 977
🏁 Script executed:
Repository: manaflow-ai/cmux
Length of output: 802
🏁 Script executed:
Repository: manaflow-ai/cmux
Length of output: 1135
🏁 Script executed:
Repository: manaflow-ai/cmux
Length of output: 219
🏁 Script executed:
# Get the full workflow file to identify all test invocations wc -l .github/workflows/test-depot.ymlRepository: manaflow-ai/cmux
Length of output: 96
🏁 Script executed:
Repository: manaflow-ai/cmux
Length of output: 4688
🏁 Script executed:
Repository: manaflow-ai/cmux
Length of output: 88
🏁 Script executed:
Repository: manaflow-ai/cmux
Length of output: 42
🏁 Script executed:
Repository: manaflow-ai/cmux
Length of output: 1085
Add validation for
test_timeoutbefore passing to xcodebuild.test_timeoutis a free-form string input with no validation. Non-numeric values pass directly to the-maximum-test-execution-time-allowancexcodebuild flag, causing xcodebuild to fail with a cryptic error message. Validate early in the "Run UI tests" step to fail clearly with an actionable message.Suggested patch
- name: Run UI tests if: ${{ !inputs.skip_ui_tests }} env: TEST_FILTER: ${{ inputs.test_filter }} TEST_TIMEOUT: ${{ inputs.test_timeout || '120' }} run: | set -euo pipefail SOURCE_PACKAGES_DIR="$PWD/.ci-source-packages" + if ! [[ "$TEST_TIMEOUT" =~ ^[0-9]+$ ]] || [ "$TEST_TIMEOUT" -le 0 ]; then + echo "Invalid test_timeout: '$TEST_TIMEOUT'. Provide a positive integer (seconds)." >&2 + exit 1 + fi🤖 Prompt for AI Agents