1+ name : BCIT InApp Messaging Integration Test 
2+ 
3+ on :
4+   pull_request :
5+     types : [opened, synchronize, reopened, labeled] 
6+   workflow_dispatch :
7+     inputs :
8+       ref :
9+         description : ' Branch or commit to test (leave empty for current branch)' 
10+         required : false 
11+         type : string 
12+ 
13+ jobs :
14+   inapp-messaging-test :
15+     name : BCIT InApp Messaging Integration Test 
16+     runs-on : macos-latest 
17+     timeout-minutes : 30 
18+     env :
19+       XCODE_VERSION : ' 16.4' 
20+     if : > 
21+       github.event_name == 'workflow_dispatch' || 
22+       ( 
23+         github.event_name == 'pull_request' && ( 
24+           contains(github.event.pull_request.labels.*.name, 'bcit') || 
25+           contains(github.event.pull_request.labels.*.name, 'BCIT') || 
26+           contains(github.event.pull_request.labels.*.name, 'bcit-inapp') || 
27+           contains(github.event.pull_request.labels.*.name, 'BCIT-INAPP') || 
28+           contains(github.event.pull_request.labels.*.name, 'Bcit') || 
29+           contains(github.event.pull_request.labels.*.name, 'Bcit-Inapp') || 
30+           startsWith(github.event.pull_request.head.ref, 'release/') 
31+         ) 
32+       ) 
33+ 
34+      steps :
35+     - name : Checkout Repository 
36+       uses : actions/checkout@v4 
37+       with :
38+         ref : ${{ github.event.inputs.ref || github.ref }} 
39+ 
40+     - name : Setup Xcode 
41+       uses : maxim-lobanov/setup-xcode@v1 
42+       with :
43+         xcode-version : ${{ env.XCODE_VERSION }} 
44+ 
45+     - name : Validate Xcode Version 
46+       run : | 
47+         echo "🔍 Validating Xcode version and environment..." 
48+         echo "DEVELOPER_DIR: $DEVELOPER_DIR" 
49+          
50+         # Check xcodebuild version 
51+         echo "🔍 Checking xcodebuild version..." 
52+         ACTUAL_XCODE_VERSION=$(xcodebuild -version | head -n 1 | awk '{print $2}') 
53+         echo "Xcode version: $ACTUAL_XCODE_VERSION" 
54+         echo "Expected version: $XCODE_VERSION" 
55+          
56+         # Check xcodebuild path 
57+         XCODEBUILD_PATH=$(which xcodebuild) 
58+         echo "xcodebuild path: $XCODEBUILD_PATH" 
59+          
60+         # Verify we're using the correct Xcode version 
61+         if echo "$ACTUAL_XCODE_VERSION" | grep -q "$XCODE_VERSION"; then 
62+           echo "✅ Using correct Xcode version: $ACTUAL_XCODE_VERSION" 
63+         else 
64+           echo "❌ Incorrect Xcode version!" 
65+           echo "Current: $ACTUAL_XCODE_VERSION" 
66+           echo "Expected: $XCODE_VERSION" 
67+           exit 1 
68+         fi 
69+ 
70+      - name : Setup Local Environment 
71+       working-directory : tests/business-critical-integration 
72+       run : | 
73+         echo "🚀 Setting up local environment for integration tests..." 
74+          
75+         # Run setup script with parameters from repository secrets 
76+         ./scripts/setup-local-environment.sh \ 
77+           "${{ secrets.BCIT_TEST_PROJECT_ID }}" \ 
78+           "${{ secrets.BCIT_ITERABLE_SERVER_KEY }}" \ 
79+           "${{ secrets.BCIT_ITERABLE_API_KEY }}" 
80+ 
81+      - name : Validate Setup 
82+       working-directory : tests/business-critical-integration 
83+       run : | 
84+         echo "🔍 Validating environment setup..." 
85+         ./scripts/validate-setup.sh 
86+ 
87+      - name : Run In App Messaging Tests 
88+       working-directory : tests/business-critical-integration 
89+       run : | 
90+         echo "🧪 Running in app integration tests..." 
91+         ./scripts/run-tests.sh inapp 
92+ 
93+      - name : Upload Test Results 
94+       if : always() 
95+       uses : actions/upload-artifact@v4 
96+       with :
97+         name : inapp-messaging-test-results 
98+         path : | 
99+           tests/business-critical-integration/reports/ 
100+           tests/business-critical-integration/screenshots/ 
101+           tests/business-critical-integration/logs/ 
102+          retention-days : 7 
0 commit comments