Skip to content

Commit f08edd6

Browse files
runningcodeclaude
andcommitted
test: enable CLI debug logging in test workflow
Use --log-level debug parameter instead of RUST_LOG env var to see the GitHub Actions PR head SHA detection debug logs in CI output. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 442b958 commit f08edd6

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

.github/workflows/test-pr-head-sha.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ jobs:
4545
fi
4646
4747
- name: Test Built CLI Head SHA Detection
48-
env:
49-
RUST_LOG: debug
5048
run: |
5149
echo "=== Testing Real sentry-cli Head SHA Detection ==="
5250
echo ""
@@ -70,11 +68,17 @@ jobs:
7068
echo "fake apk content" > test_artifacts/test.apk
7169
7270
echo "=== Running sentry-cli build upload with debug logging ==="
73-
echo "Command: ./target/release/sentry-cli build upload test_artifacts/test.apk --head-sha-from-detection"
71+
echo "Command: ./target/release/sentry-cli --log-level debug build upload test_artifacts/test.apk"
7472
echo ""
73+
echo "🔍 WATCH FOR DEBUG LOGS BELOW:"
74+
echo "Expected debug log: 'Using GitHub Actions PR head SHA from event payload: ${{ github.event.pull_request.head.sha }}'"
75+
echo ""
76+
echo "--- CLI OUTPUT START ---"
77+
78+
# Test the CLI's head-sha detection with debug logging enabled
79+
./target/release/sentry-cli --log-level debug build upload test_artifacts/test.apk || true
7580
76-
# Test the CLI's head-sha detection (we'll expect it to fail due to no auth, but we can see the SHA detection)
77-
./target/release/sentry-cli build upload test_artifacts/test.apk || true
81+
echo "--- CLI OUTPUT END ---"
7882
7983
echo ""
8084
echo "=== Analysis ==="
@@ -91,8 +95,8 @@ jobs:
9195
unset GITHUB_EVENT_PATH
9296
unset GITHUB_EVENT_NAME
9397
94-
echo "Running CLI without GitHub Actions context..."
95-
./target/release/sentry-cli build upload test_artifacts/test.apk || true
98+
echo "Running CLI without GitHub Actions context (with debug logging)..."
99+
./target/release/sentry-cli --log-level debug build upload test_artifacts/test.apk || true
96100
97101
echo ""
98102
echo "Expected: Should fall back to 'git rev-parse HEAD'"

0 commit comments

Comments
 (0)