Skip to content

Commit cf0c9c4

Browse files
0xadam-browncursoragent
authored andcommitted
fix(ci): Skip snapshot upload when Gradle cache omits test output
Rerunning a single Android unit-test task after check is unreliable with configuration cache. Warn and skip the sentry-cli upload instead of failing the Build workflow when the directory is absent. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent b969885 commit cf0c9c4

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,10 @@ jobs:
5353
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
5454
run: |
5555
SNAPSHOT_DIR=./sentry-android-core/build/test-snapshots
56-
if [ ! -d "$SNAPSHOT_DIR" ]; then
57-
echo "Snapshot directory missing (likely Gradle cache hit); running screenshot tests"
58-
./gradlew :sentry-android-core:test \
59-
--tests io.sentry.android.core.ScreenshotEventProcessorTest \
60-
--rerun-tasks --no-configuration-cache
61-
fi
6256
if [ -d "$SNAPSHOT_DIR" ]; then
6357
sentry-cli build snapshots "$SNAPSHOT_DIR" --app-id sentry-android-core
6458
else
65-
echo "::warning::Snapshot directory still missing after rerun; skipping upload"
59+
echo "::warning::Snapshot directory missing after check (likely Gradle cache hit); skipping upload"
6660
fi
6761
env:
6862
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}

0 commit comments

Comments
 (0)