Integration Tests #1457
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: Integration Tests | |
| on: | |
| schedule: | |
| - cron: 0 2 * * 1-5 | |
| workflow_dispatch: | |
| jobs: | |
| unit: | |
| name: Unit Tests | |
| uses: ./.github/workflows/unitTests.yml | |
| integration: | |
| name: ${{ matrix.xcode }} / ${{ matrix.platform }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| xcode: ["Xcode_26.2", "Xcode_26.4"] | |
| platform: ["macOS", "iOSsim", "tvOSsim", "watchOSsim", "visionOSsim"] | |
| runs-on: macos-26 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup ${{ matrix.xcode }} | |
| id: xcode | |
| uses: ./.github/actions/setup-xcode | |
| with: | |
| version: ${{ matrix.xcode }} | |
| - name: Run tests for ${{ matrix.platform }} | |
| run: >- | |
| make XC_LOG=integration | |
| IOS_SIMULATOR="${{ steps.xcode.outputs.ios-simulator }}" | |
| TVOS_SIMULATOR="${{ steps.xcode.outputs.tvos-simulator }}" | |
| WATCHOS_SIMULATOR="${{ steps.xcode.outputs.watchos-simulator }}" | |
| VISIONOS_SIMULATOR="${{ steps.xcode.outputs.visionos-simulator }}" | |
| tests/integration/${{ matrix.platform }} | |
| env: | |
| DD_API_KEY: '${{ secrets.DD_API_KEY }}' | |
| DD_TEST_RUNNER: 1 | |
| - name: Attach Xcode logs | |
| if: '!cancelled()' | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: ${{ matrix.xcode }}-${{ matrix.platform }}-integration-log | |
| path: "logs-integration/*.log" | |
| - name: Collect xcresult bundles | |
| if: failure() | |
| run: | | |
| set -euo pipefail | |
| mkdir -p xcresults-integration | |
| # Grab every xcresult produced during this job and zip each one to | |
| # keep the artifact upload fast (xcresult is a bundle of thousands | |
| # of small files otherwise). Two source locations: | |
| # - default DerivedData under $HOME: outer `xcodebuild test` bundle. | |
| # - $GITHUB_WORKSPACE/build/integration-DerivedData: inner | |
| # `xcodebuild test-without-building` bundles spawned by the | |
| # runner. Inner builds use an isolated DerivedData so the | |
| # outer SWBBuildService can't evict their cache. | |
| for root in "$HOME/Library/Developer/Xcode/DerivedData" "$GITHUB_WORKSPACE/build/integration-DerivedData"; do | |
| [ -d "$root" ] || continue | |
| find "$root" -type d -name '*.xcresult' -print0 \ | |
| | while IFS= read -r -d '' bundle; do | |
| name=$(basename "$bundle" .xcresult) | |
| (cd "$(dirname "$bundle")" && zip -qry "$GITHUB_WORKSPACE/xcresults-integration/$name.zip" "$(basename "$bundle")") | |
| done | |
| done | |
| - name: Attach xcresult bundles | |
| if: failure() | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: ${{ matrix.xcode }}-${{ matrix.platform }}-integration-xcresult | |
| path: "xcresults-integration/*.zip" | |
| if-no-files-found: ignore |