Skip to content

Commit 25c41d0

Browse files
author
greweb
committed
Fix CI snapshot organization by platform
- Add platform-specific snapshot directories (ios-output, android-output) - Separate iOS and Android snapshots in CI artifacts - Fix issue where both platforms were using same snapshot structure - Ensure proper snapshot separation for visual regression testing
1 parent 7c69353 commit 25c41d0

File tree

1 file changed

+34
-4
lines changed

1 file changed

+34
-4
lines changed

.github/workflows/ci.yml

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -600,14 +600,29 @@ jobs:
600600
rm metro.pid
601601
fi
602602
603+
- name: Organize iOS Snapshots
604+
if: always()
605+
run: |
606+
# Create platform-specific snapshot directories
607+
mkdir -p example/e2e/snapshots/ios-output
608+
mkdir -p example/e2e/snapshots/ios-reference
609+
610+
# Copy snapshots to platform-specific directories
611+
if [ -d "example/e2e/snapshots/output" ]; then
612+
cp -r example/e2e/snapshots/output/* example/e2e/snapshots/ios-output/ 2>/dev/null || true
613+
fi
614+
if [ -d "example/e2e/snapshots/reference" ]; then
615+
cp -r example/e2e/snapshots/reference/* example/e2e/snapshots/ios-reference/ 2>/dev/null || true
616+
fi
617+
603618
- name: Upload Detox Snapshots
604619
if: always()
605620
uses: actions/upload-artifact@v4
606621
with:
607622
name: detox-snapshots-ios
608623
path: |
609-
example/e2e/snapshots/output/**/*.png
610-
example/e2e/snapshots/reference/**/*.png
624+
example/e2e/snapshots/ios-output/**/*.png
625+
example/e2e/snapshots/ios-reference/**/*.png
611626
example/artifacts/**/*.png
612627
613628
- name: Upload Detox Test Results
@@ -751,14 +766,29 @@ jobs:
751766
done
752767
fi
753768
769+
- name: Organize Android Snapshots
770+
if: always()
771+
run: |
772+
# Create platform-specific snapshot directories
773+
mkdir -p example/e2e/snapshots/android-output
774+
mkdir -p example/e2e/snapshots/android-reference
775+
776+
# Copy snapshots to platform-specific directories
777+
if [ -d "example/e2e/snapshots/output" ]; then
778+
cp -r example/e2e/snapshots/output/* example/e2e/snapshots/android-output/ 2>/dev/null || true
779+
fi
780+
if [ -d "example/e2e/snapshots/reference" ]; then
781+
cp -r example/e2e/snapshots/reference/* example/e2e/snapshots/android-reference/ 2>/dev/null || true
782+
fi
783+
754784
- name: Upload Detox Snapshots
755785
if: always()
756786
uses: actions/upload-artifact@v4
757787
with:
758788
name: detox-snapshots-android
759789
path: |
760-
example/e2e/snapshots/output/**/*.png
761-
example/e2e/snapshots/reference/**/*.png
790+
example/e2e/snapshots/android-output/**/*.png
791+
example/e2e/snapshots/android-reference/**/*.png
762792
example/artifacts/**/*.png
763793
764794
- name: Upload Detox Test Results

0 commit comments

Comments
 (0)