Skip to content

Commit 6940d39

Browse files
committed
ci(integration): improve binary cache debugging and reduce noise
Binary cache restoration improvements: - Add cache hit status output to see if caches were restored - List dist directory contents to verify what files exist - Show detailed error messages explaining why binaries weren't found - Provide instructions on how to build and cache binaries Test improvements: - Suppress authentication warning in CI (process.env.CI check) - Warning is still shown locally to help developers set up auth - Reduces CI log noise while maintaining local developer UX This helps diagnose why SEA/smol binaries aren't being found in integration tests despite being built and cached.
1 parent 81089d9 commit 6940d39

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,18 @@ jobs:
132132
run: |
133133
echo "Setting up cached binaries for integration tests..."
134134
echo ""
135+
echo "Cache restoration status:"
136+
echo " SEA cache hit: ${{ steps.sea-cache.outputs.cache-hit }}"
137+
echo " Smol cache hit: ${{ steps.smol-cache.outputs.cache-hit }}"
138+
echo ""
139+
140+
# Debug: List cache directories.
141+
echo "SEA dist directory contents:"
142+
ls -lah packages/node-sea-builder/dist/ 2>/dev/null || echo " (directory does not exist)"
143+
echo ""
144+
echo "Smol dist directory contents:"
145+
ls -lah packages/node-smol-builder/dist/ 2>/dev/null || echo " (directory does not exist)"
146+
echo ""
135147
136148
# Copy SEA binary from cache to expected test location.
137149
SEA_CACHED="packages/node-sea-builder/dist/sea/socket-linux-x64"
@@ -144,6 +156,14 @@ jobs:
144156
echo "sea=true" >> $GITHUB_OUTPUT
145157
else
146158
echo "✗ SEA binary not found in cache (expected: $SEA_CACHED)"
159+
if [ "${{ steps.sea-cache.outputs.cache-hit }}" = "true" ]; then
160+
echo " Cache was restored but binary not at expected location"
161+
echo " Available files in packages/node-sea-builder/dist/:"
162+
find packages/node-sea-builder/dist/ -type f 2>/dev/null || echo " (no files found)"
163+
else
164+
echo " No cache available - binaries not built yet"
165+
echo " Run build-sea.yml workflow to build and cache SEA binaries"
166+
fi
147167
echo "sea=false" >> $GITHUB_OUTPUT
148168
fi
149169
@@ -158,6 +178,14 @@ jobs:
158178
echo "smol=true" >> $GITHUB_OUTPUT
159179
else
160180
echo "✗ Smol binary not found in cache (expected: $SMOL_CACHED)"
181+
if [ "${{ steps.smol-cache.outputs.cache-hit }}" = "true" ]; then
182+
echo " Cache was restored but binary not at expected location"
183+
echo " Available files in packages/node-smol-builder/dist/:"
184+
find packages/node-smol-builder/dist/ -type f 2>/dev/null || echo " (no files found)"
185+
else
186+
echo " No cache available - binaries not built yet"
187+
echo " Run build-smol.yml workflow to build and cache smol binaries"
188+
fi
161189
echo "smol=false" >> $GITHUB_OUTPUT
162190
fi
163191

packages/cli/test/integration/binary/binary-test-suite.test.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ function runBinaryTestSuite(binaryType: keyof typeof BINARIES) {
185185
if (ENV.RUN_INTEGRATION_TESTS) {
186186
const apiToken = await getDefaultApiToken()
187187
hasAuth = !!apiToken
188-
if (!apiToken) {
188+
if (!apiToken && !process.env.CI) {
189189
getDefaultLogger().log('')
190190
getDefaultLogger().warn(
191191
'Integration tests require Socket authentication.',

0 commit comments

Comments
 (0)