Skip to content

Commit 9fb9fe7

Browse files
committed
github workflow: Fix .agents test logic to fail correctly
1 parent 08f4c5e commit 9fb9fe7

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,12 @@ jobs:
155155
command: |
156156
cd ${{ matrix.package }}
157157
if [ "${{ matrix.package }}" = ".agents" ]; then
158-
find __tests__ -name '*.test.ts' ! -name '*.integration.test.ts' 2>/dev/null | sort | xargs -I {} bun test {} || echo "No regular tests found in .agents"
158+
TEST_FILES=$(find __tests__ -name '*.test.ts' ! -name '*.integration.test.ts' 2>/dev/null | sort)
159+
if [ -n "$TEST_FILES" ]; then
160+
echo "$TEST_FILES" | xargs -I {} bun test {}
161+
else
162+
echo "No regular tests found in .agents"
163+
fi
159164
elif [ "${{ matrix.package }}" = "web" ]; then
160165
bun run test --runInBand
161166
else
@@ -245,7 +250,12 @@ jobs:
245250
command: |
246251
cd ${{ matrix.package }}
247252
if [ "${{ matrix.package }}" = ".agents" ]; then
248-
find __tests__ -name '*.integration.test.ts' 2>/dev/null | sort | xargs -I {} bun test --timeout=60000 {} || echo "No integration tests found in .agents"
253+
TEST_FILES=$(find __tests__ -name '*.integration.test.ts' 2>/dev/null | sort)
254+
if [ -n "$TEST_FILES" ]; then
255+
echo "$TEST_FILES" | xargs -I {} bun test --timeout=60000 {}
256+
else
257+
echo "No integration tests found in .agents"
258+
fi
249259
else
250260
find src -name '*.integration.test.ts' | sort | xargs -I {} bun test --timeout=60000 {}
251261
fi

0 commit comments

Comments
 (0)