Skip to content

feat: Implement strict trace continuation #8144

feat: Implement strict trace continuation

feat: Implement strict trace continuation #8144

name: Test CocoaPods
on:
push:
branches:
- main
- v8.x
pull_request:
# Concurrency configuration:
# - We use workflow-specific concurrency groups to prevent multiple CocoaPods integration tests,
# as these tests involve complex dependency resolution and build processes.
# - For pull requests, we cancel in-progress runs when new commits are pushed since only the
# latest integration test results matter for validating CocoaPods compatibility.
# - For main branch pushes, we never cancel integration tests to ensure our CocoaPods
# integration remains functional for all downstream consumers relying on our library.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
files-changed:
name: Detect File Changes
runs-on: ubuntu-latest
outputs:
run_integration_test_for_prs: ${{ steps.changes.outputs.run_integration_test_for_prs }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Get changed files
id: changes
uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
with:
token: ${{ github.token }}
filters: .github/file-filters.yml
test:
name: CocoaPods Integration
if: github.event_name != 'pull_request' || needs.files-changed.outputs.run_integration_test_for_prs == 'true'
needs: files-changed
runs-on: macos-15
steps:
- name: Checkout Repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Select Xcode
run: ./scripts/ci-select-xcode.sh 16.4
- name: Setup Ruby
uses: ruby/setup-ruby@3ff19f5e2baf30647122352b96108b1fbe250c64 # v1.299.0
with:
bundler-cache: true
- name: Run Integration Test
run: bundle exec fastlane cocoapods_integration_test
working-directory: Samples/iOS-Cocoapods-Swift6
- name: Upload Result Bundle
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
if: ${{ failure() }}
with:
name: integration-test-iOS-Cocoapods-Swift6.xcresult
path: Samples/iOS-Cocoapods-Swift6/fastlane/test_results/results.xcresult
- name: Run CI Diagnostics
if: failure()
shell: bash
run: ./scripts/ci-diagnostics.sh
# This check validates that either all integration tests passed or were skipped, which allows us
# to make integration tests a required check with only running the integration tests when required.
# So, we don't have to run integration tests, for example, for Changelog or ReadMe changes.
integration_test-required-check:
needs: [files-changed, test]
name: Integration Test
# This is necessary since a failed/skipped dependent job would cause this job to be skipped
if: always()
runs-on: ubuntu-latest
steps:
# If any jobs we depend on fails gets cancelled or times out, this job will fail.
# Skipped jobs are not considered failures.
- name: Check for failures
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
run: |
echo "One of the integration test jobs has failed." && exit 1