feat: Add propagating of traceparent #3936
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: Test CocoaPods | |
on: | |
push: | |
branches: | |
- main | |
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@v5 | |
- name: Get changed files | |
id: changes | |
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
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@v5 | |
- name: Select Xcode | |
run: ./scripts/ci-select-xcode.sh 16.4 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@32110d4e311bd8996b2a82bf2a43b714ccc91777 # v1.221.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@v4 | |
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 |