Skip to content

Commit a9ffc01

Browse files
abueideclaude
andcommitted
perf(tests): parallelize unit and integration tests
Update test:fast to use process-compose for parallel test execution instead of running tests sequentially. This significantly speeds up the fast test suite. Changes: - Added missing tests to process-compose-unit-tests.yaml: - Android: apk-detection, apk-resolution - iOS: app-resolution - devbox-mcp: all tests (via nested process-compose) - Updated test:fast to use test:unit (parallel) instead of test:plugin:unit and test:integration (sequential) - All unit and integration tests now run concurrently via process-compose Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 0eea123 commit a9ffc01

2 files changed

Lines changed: 37 additions & 3 deletions

File tree

devbox.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,9 @@
195195
"bash scripts/bump.sh \"${@}\""
196196
],
197197
"test:fast": [
198-
"echo 'Running fast tests (lint + unit + integration)...'",
198+
"echo 'Running fast tests (lint + unit + integration in parallel)...'",
199199
"devbox run lint",
200-
"devbox run test:plugin:unit",
201-
"devbox run test:integration",
200+
"devbox run test:unit",
202201
"bash tests/test-summary.sh"
203202
]
204203
}

tests/process-compose-unit-tests.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@ processes:
1616
availability:
1717
restart: "no"
1818

19+
test-android-apk-detection:
20+
command: "cd examples/android && devbox run bash ../../plugins/tests/android/test-apk-detection.sh"
21+
availability:
22+
restart: "no"
23+
24+
test-android-apk-resolution:
25+
command: "bash plugins/tests/android/test-apk-resolution.sh"
26+
availability:
27+
restart: "no"
28+
1929
# Android integration tests
2030
test-android-device-mgmt:
2131
command: "bash tests/integration/android/test-device-mgmt.sh"
@@ -38,6 +48,11 @@ processes:
3848
availability:
3949
restart: "no"
4050

51+
test-ios-app-resolution:
52+
command: "bash plugins/tests/ios/test-app-resolution.sh"
53+
availability:
54+
restart: "no"
55+
4156
# iOS integration tests
4257
test-ios-device-mgmt:
4358
command: "bash tests/integration/ios/test-device-mgmt.sh"
@@ -55,6 +70,12 @@ processes:
5570
availability:
5671
restart: "no"
5772

73+
# devbox-mcp plugin tests
74+
test-devbox-mcp:
75+
command: "process-compose -f plugins/devbox-mcp/tests/test-suite.yaml --no-server --tui=false"
76+
availability:
77+
restart: "no"
78+
5879
# Summary - only runs when all tests pass
5980
summary:
6081
command: |
@@ -66,18 +87,24 @@ processes:
6687
echo "Android Tests:"
6788
echo " - lib.sh"
6889
echo " - devices.sh"
90+
echo " - apk-detection"
91+
echo " - apk-resolution"
6992
echo " - device-mgmt (integration)"
7093
echo " - validation (integration)"
7194
echo ""
7295
echo "iOS Tests:"
7396
echo " - lib.sh"
7497
echo " - devices.sh"
98+
echo " - app-resolution"
7599
echo " - device-mgmt (integration)"
76100
echo " - cache (integration)"
77101
echo ""
78102
echo "React Native Tests:"
79103
echo " - lib.sh"
80104
echo ""
105+
echo "devbox-mcp Tests:"
106+
echo " - All tests"
107+
echo ""
81108
echo "========================================"
82109
echo " ALL UNIT TESTS PASSED"
83110
echo "========================================"
@@ -95,6 +122,10 @@ processes:
95122
condition: process_completed_successfully
96123
test-android-devices:
97124
condition: process_completed_successfully
125+
test-android-apk-detection:
126+
condition: process_completed_successfully
127+
test-android-apk-resolution:
128+
condition: process_completed_successfully
98129
test-android-device-mgmt:
99130
condition: process_completed_successfully
100131
test-android-validation:
@@ -103,12 +134,16 @@ processes:
103134
condition: process_completed_successfully
104135
test-ios-devices:
105136
condition: process_completed_successfully
137+
test-ios-app-resolution:
138+
condition: process_completed_successfully
106139
test-ios-device-mgmt:
107140
condition: process_completed_successfully
108141
test-ios-cache:
109142
condition: process_completed_successfully
110143
test-rn-lib:
111144
condition: process_completed_successfully
145+
test-devbox-mcp:
146+
condition: process_completed_successfully
112147
availability:
113148
restart: "no"
114149
exit_on_end: true

0 commit comments

Comments
 (0)