Fix CI test issues #775
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: Swift | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| cancel_previous: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: styfle/[email protected] | |
| with: | |
| workflow_id: ${{ github.event.workflow.id }} | |
| generate_code_coverage: | |
| needs: cancel_previous | |
| runs-on: macos-26 | |
| steps: | |
| - uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: "26" | |
| - uses: actions/checkout@v2 | |
| - uses: webfactory/[email protected] | |
| with: | |
| ssh-private-key: ${{ secrets.SOVRAN_SSH_KEY }} | |
| - name: Build & Run tests | |
| run: swift test --enable-code-coverage | |
| - name: Convert coverage report | |
| run: xcrun llvm-cov export -format="lcov" .build/debug/SegmentPackageTests.xctest/Contents/MacOS/SegmentPackageTests -instr-profile .build/debug/codecov/default.profdata > coverage.lcov | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/[email protected] | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| slug: segmentio/analytics-swift | |
| build_and_test_spm_mac: | |
| needs: cancel_previous | |
| runs-on: macos-26 | |
| steps: | |
| - uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: "26" | |
| - uses: actions/checkout@v2 | |
| - uses: webfactory/[email protected] | |
| with: | |
| ssh-private-key: ${{ secrets.SOVRAN_SSH_KEY }} | |
| - name: Build & Run tests | |
| run: swift test | |
| build_and_test_ios: | |
| needs: cancel_previous | |
| runs-on: macos-26 | |
| steps: | |
| - uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: "26" | |
| - uses: actions/checkout@v2 | |
| - uses: webfactory/[email protected] | |
| with: | |
| ssh-private-key: ${{ secrets.SOVRAN_SSH_KEY }} | |
| - run: xcodebuild -scheme Segment test -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 17' | |
| build_and_test_tvos: | |
| needs: cancel_previous | |
| runs-on: macos-26 | |
| steps: | |
| - uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: "26" | |
| - uses: actions/checkout@v2 | |
| - uses: webfactory/[email protected] | |
| with: | |
| ssh-private-key: ${{ secrets.SOVRAN_SSH_KEY }} | |
| - run: xcodebuild -scheme Segment test -sdk appletvsimulator -destination 'platform=tvOS Simulator,name=Apple TV' | |
| build_and_test_watchos: | |
| needs: cancel_previous | |
| runs-on: macos-26 | |
| steps: | |
| - uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: "26" | |
| - uses: actions/checkout@v2 | |
| - uses: webfactory/[email protected] | |
| with: | |
| ssh-private-key: ${{ secrets.SOVRAN_SSH_KEY }} | |
| - run: xcodebuild -scheme Segment test -sdk watchsimulator -destination 'platform=watchOS Simulator,name=Apple Watch Ultra 3 (49mm)' | |
| build_and_test_visionos: | |
| needs: cancel_previous | |
| runs-on: macos-26 | |
| steps: | |
| - uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: "26" | |
| - uses: actions/checkout@v2 | |
| - uses: webfactory/[email protected] | |
| with: | |
| ssh-private-key: ${{ secrets.SOVRAN_SSH_KEY }} | |
| - run: xcodebuild -scheme Segment test -destination 'platform=visionOS Simulator,OS=26.0,name=Apple Vision Pro' | |
| build_and_test_examples: | |
| needs: cancel_previous | |
| runs-on: macos-26 | |
| steps: | |
| - uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: "26" | |
| - uses: actions/checkout@v2 | |
| - uses: webfactory/[email protected] | |
| with: | |
| ssh-private-key: ${{ secrets.SOVRAN_SSH_KEY }} | |
| - name: build for ios simulator | |
| run: | | |
| cd Examples/apps/BasicExample | |
| xcodebuild -workspace "BasicExample.xcworkspace" -scheme "BasicExample" -sdk iphonesimulator | |
| - name: build for ios simulator | |
| run: | | |
| cd Examples/apps/ObjCExample | |
| xcodebuild -workspace "ObjCExample.xcworkspace" -scheme "ObjCExample" -sdk iphonesimulator | |
| - name: build for ios simulator | |
| run: | | |
| cd Examples/apps/SegmentUIKitExample | |
| xcodebuild -workspace "SegmentUIKitExample.xcworkspace" -scheme "SegmentUIKitExample" -sdk iphonesimulator | |
| - name: build for ios simulator | |
| run: | | |
| cd Examples/apps/SegmentWeatherWidget | |
| xcodebuild -workspace "SegmentWeatherWidget.xcworkspace" -scheme "SegmentWeatherWidget" -sdk iphonesimulator | |
| - name: build for mac catalyst | |
| run: | | |
| cd Examples/apps/SegmentUIKitExample | |
| xcodebuild -workspace "SegmentUIKitExample.xcworkspace" -scheme "SegmentUIKitExample" -destination 'platform=macOS,variant=Mac Catalyst' |