Skip to content

Commit 9d10730

Browse files
committed
Find test executable
1 parent b56b567 commit 9d10730

File tree

1 file changed

+26
-6
lines changed

1 file changed

+26
-6
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,12 @@ jobs:
9191
swift sdk list
9292
9393
- name: Build for x86_64-musl
94-
run: swift build --swift-sdk x86_64-swift-linux-musl -v
95-
96-
- name: Run tests (host)
97-
run: swift test -v
94+
run: |
95+
swift build --swift-sdk x86_64-swift-linux-musl -v
96+
swift test --swift-sdk x86_64-swift-linux-musl --build-tests-only -v
97+
# List contents to verify test binary location
98+
find .build/x86_64-swift-linux-musl -name "*Test*" -type f | sort
99+
ls -la .build/x86_64-swift-linux-musl/debug
98100
99101
- name: Upload build artifacts
100102
uses: actions/upload-artifact@v4
@@ -110,14 +112,32 @@ jobs:
110112
steps:
111113
- uses: actions/checkout@v4
112114

115+
- name: Install system dependencies
116+
run: apk add --no-cache bash
117+
113118
- name: Download compiled binaries
114119
uses: actions/download-artifact@v4
115120
with:
116121
name: alpine-binaries-6.1.0
117122
path: .build/debug
118123

119124
- name: Set permissions
120-
run: chmod +x .build/debug/*
125+
shell: bash
126+
run: |
127+
chmod +x .build/debug/*
128+
ls -la .build/debug
121129
122130
- name: Run tests
123-
run: .build/debug/MCPTests
131+
shell: bash
132+
run: |
133+
# Try to find and run the test executable
134+
TEST_EXEC=$(find .build/debug -name "*Test*" -type f | head -1)
135+
if [ -n "$TEST_EXEC" ]; then
136+
echo "Running test executable: $TEST_EXEC"
137+
chmod +x "$TEST_EXEC"
138+
$TEST_EXEC
139+
else
140+
echo "Test executable not found!"
141+
ls -la .build/debug
142+
exit 1
143+
fi

0 commit comments

Comments
 (0)