Skip to content

Commit d07ac2c

Browse files
committed
ci: fix HAS_TESTS computation — avoid arithmetic expansion; group grep with || true under pipefail
1 parent 4a6307a commit d07ac2c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ jobs:
126126
shell: bash
127127
run: |
128128
set -euo pipefail
129-
HAS_TESTS=$(( (grep -R --include=\*.m --include=\*.swift -n "XCTestCase" . || true) | wc -l | xargs ))
129+
HAS_TESTS=$( { grep -R --include='*.m' --include='*.swift' -n "XCTestCase" . || true; } | wc -l | tr -d '[:space:]')
130130
if [[ "$HAS_TESTS" -gt "0" ]]; then
131131
if [[ "${KIND:-}" == "workspace" ]]; then
132132
# Only run tests with a scheme; if no shared scheme, skip.

0 commit comments

Comments
 (0)