Initial CodeQL commit #70
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: BCIT Push Notification Integration Test | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, labeled] | |
| workflow_dispatch: | |
| inputs: | |
| ref: | |
| description: 'Branch or commit to test (leave empty for current branch)' | |
| required: false | |
| type: string | |
| env: | |
| DEVELOPER_DIR: /Applications/Xcode_16.2.app/Contents/Developer | |
| jobs: | |
| push-notification-test: | |
| name: BCIT Push Notification Integration Test | |
| runs-on: macos-latest | |
| timeout-minutes: 30 | |
| if: > | |
| github.event_name == 'workflow_dispatch' || | |
| ( | |
| github.event_name == 'pull_request' && ( | |
| contains(github.event.pull_request.labels.*.name, 'bcit') || | |
| contains(github.event.pull_request.labels.*.name, 'BCIT') || | |
| contains(github.event.pull_request.labels.*.name, 'bcit-push') || | |
| contains(github.event.pull_request.labels.*.name, 'BCIT-PUSH') || | |
| contains(github.event.pull_request.labels.*.name, 'Bcit') || | |
| contains(github.event.pull_request.labels.*.name, 'Bcit-Push') || | |
| startsWith(github.event.pull_request.head.ref, 'release/') | |
| ) | |
| ) | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.inputs.ref || github.ref }} | |
| - name: Setup Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: '16.4' | |
| - name: Validate Xcode Version | |
| run: | | |
| echo "🔍 Validating Xcode version and environment..." | |
| echo "DEVELOPER_DIR: $DEVELOPER_DIR" | |
| echo "Expected Xcode path: /Applications/Xcode_16.2.app/Contents/Developer" | |
| # Check if DEVELOPER_DIR points to the right Xcode | |
| if [[ "$DEVELOPER_DIR" == "/Applications/Xcode_16.2.app/Contents/Developer" ]]; then | |
| echo "✅ DEVELOPER_DIR is correctly set" | |
| else | |
| echo "❌ DEVELOPER_DIR mismatch!" | |
| echo "Current: $DEVELOPER_DIR" | |
| echo "Expected: /Applications/Xcode_16.2.app/Contents/Developer" | |
| fi | |
| # Check xcodebuild version | |
| echo "🔍 Checking xcodebuild version..." | |
| XCODE_VERSION=$(xcodebuild -version | head -n 1) | |
| echo "Xcode version: $XCODE_VERSION" | |
| # Check xcodebuild path | |
| XCODEBUILD_PATH=$(which xcodebuild) | |
| echo "xcodebuild path: $XCODEBUILD_PATH" | |
| # Verify we're using Xcode 16.2 | |
| if echo "$XCODE_VERSION" | grep -q "16.2"; then | |
| echo "✅ Using correct Xcode version: $XCODE_VERSION" | |
| else | |
| echo "❌ Incorrect Xcode version!" | |
| echo "Current: $XCODE_VERSION" | |
| echo "Expected: Xcode 16.2" | |
| exit 1 | |
| fi | |
| - name: Setup Local Environment | |
| working-directory: tests/business-critical-integration | |
| run: | | |
| echo "🚀 Setting up local environment for integration tests..." | |
| # Run setup script with parameters from repository secrets | |
| ./scripts/setup-local-environment.sh \ | |
| "${{ secrets.BCIT_TEST_PROJECT_ID }}" \ | |
| "${{ secrets.BCIT_ITERABLE_SERVER_KEY }}" \ | |
| "${{ secrets.BCIT_ITERABLE_API_KEY }}" | |
| - name: Validate Setup | |
| working-directory: tests/business-critical-integration | |
| run: | | |
| echo "🔍 Validating environment setup..." | |
| ./scripts/validate-setup.sh | |
| - name: Run Push Notification Tests | |
| working-directory: tests/business-critical-integration | |
| run: | | |
| echo "🧪 Running push notification integration tests..." | |
| CI=true ./scripts/run-tests.sh push | |
| - name: Upload Test Results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: push-notification-test-results | |
| path: | | |
| tests/business-critical-integration/reports/ | |
| tests/business-critical-integration/screenshots/ | |
| tests/business-critical-integration/logs/ | |
| retention-days: 7 |