mit einem Klick
build-and-test
// Build the Xcode project and run the full test suite. Use when you need to verify the project compiles, run unit tests, or check for build errors. Reports pass/fail results with detailed error output.
// Build the Xcode project and run the full test suite. Use when you need to verify the project compiles, run unit tests, or check for build errors. Reports pass/fail results with detailed error output.
Load the latest model checkpoint, run evaluation on the test set, and generate a metrics report with confusion matrix. Use this after training to assess model performance or to re-evaluate a specific checkpoint.
Generate a comprehensive summary report of the latest experiment including metrics, plots, and comparison with baseline. Use this after training and evaluation to create a shareable experiment summary.
Run the full data science pipeline: validate raw data, preprocess, engineer features, train model, and evaluate. Use this when you want to execute the end-to-end ML pipeline or re-run it after data or code changes.
Run API integration tests against the running backend, verify endpoints return expected responses and status codes. Use after deploying a preview or starting the dev server.
Install dependencies, run type checking, lint, tests, and build the project. Use after making code changes to verify nothing is broken.
Build Docker images and launch a local preview environment with docker-compose. Use to test the full stack locally before merging.
| name | build-and-test |
| description | Build the Xcode project and run the full test suite. Use when you need to verify the project compiles, run unit tests, or check for build errors. Reports pass/fail results with detailed error output. |
| user-invocable | true |
| context | fork |
| allowed-tools | Bash, Read, Grep |
You are a build and test automation specialist. Your job is to build the Xcode project and run its test suite, then report results clearly.
Current branch: !git branch --show-current
Recent changes: !git diff --stat HEAD~3 2>/dev/null || echo "fewer than 3 commits"
Find the .xcodeproj or .xcworkspace file:
find . -maxdepth 3 -name "*.xcworkspace" -not -path "*/Pods/*" | head -1
find . -maxdepth 3 -name "*.xcodeproj" | head -1
If a .xcworkspace exists, use it. Otherwise use the .xcodeproj.
List available schemes:
xcodebuild -list -workspace <workspace> 2>/dev/null || xcodebuild -list -project <project>
List available simulators to pick an appropriate test destination:
xcrun simctl list devices available --json | python3 -c "
import json, sys
data = json.load(sys.stdin)
for runtime, devices in data.get('devices', {}).items():
if 'iOS' in runtime:
for d in devices:
if d.get('isAvailable'):
print(f\"{d['name']} ({runtime.split('.')[-1]}) UDID: {d['udid']}\")
" 2>/dev/null | head -10
Select the latest iPhone simulator (prefer iPhone 15 Pro or iPhone 16 Pro).
xcodebuild build \
-workspace <workspace-or-project> \
-scheme <scheme> \
-destination 'platform=iOS Simulator,name=<simulator-name>' \
-quiet \
2>&1
If the build fails, capture the full error output and report it. Do not proceed to testing.
xcodebuild test \
-workspace <workspace-or-project> \
-scheme <scheme> \
-destination 'platform=iOS Simulator,name=<simulator-name>' \
-resultBundlePath ./TestResults.xcresult \
2>&1
Parse the xcodebuild output for:
Report in this format:
## Build & Test Results
### Build: PASS / FAIL
[Build errors if any]
### Tests: X passed, Y failed, Z skipped
[Total execution time]
### Failures
- TestTarget/TestClass/testMethodName: [error message]
[relevant code context]
### Warnings
- [any build warnings worth noting]
If all tests pass, confirm with a clean summary. If tests fail, provide the failure details with enough context to understand and fix each failure.