Comprehensive Tachikoma SDK documentation update #3
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: Tests | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # macOS tests with all Apple platforms | |
| test-apple-platforms: | |
| name: Test Apple Platforms | |
| runs-on: macos-15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: [macOS, iOS, tvOS, watchOS] | |
| include: | |
| - platform: macOS | |
| destination: 'platform=macOS' | |
| sdk: macosx | |
| - platform: iOS | |
| destination: 'platform=iOS Simulator,name=iPhone 16,OS=latest' | |
| sdk: iphonesimulator | |
| - platform: tvOS | |
| destination: 'platform=tvOS Simulator,name=Apple TV,OS=latest' | |
| sdk: appletvsimulator | |
| - platform: watchOS | |
| destination: 'platform=watchOS Simulator,name=Apple Watch Series 10 (46mm),OS=latest' | |
| sdk: watchsimulator | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - name: Cache Swift Package Manager | |
| uses: actions/cache@v4 | |
| with: | |
| path: .build | |
| key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} | |
| restore-keys: | | |
| ${{ runner.os }}-spm- | |
| - name: Test ${{ matrix.platform }} | |
| run: | | |
| set -o pipefail | |
| xcodebuild test \ | |
| -scheme Tachikoma \ | |
| -sdk ${{ matrix.sdk }} \ | |
| -destination '${{ matrix.destination }}' \ | |
| -enableCodeCoverage YES \ | |
| -derivedDataPath .build/DerivedData \ | |
| CODE_SIGNING_REQUIRED=NO \ | |
| CODE_SIGNING_ALLOWED=NO | xcpretty | |
| - name: Upload coverage reports | |
| if: matrix.platform == 'macOS' | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| xcode: true | |
| xcode_archive_path: .build/DerivedData/Logs/Test/*.xcresult | |
| # Linux tests | |
| test-linux: | |
| name: Test Linux | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| swift-version: ['6.0', '5.10'] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Swift | |
| uses: swift-actions/setup-swift@v2 | |
| with: | |
| swift-version: ${{ matrix.swift-version }} | |
| - name: Cache Swift Package Manager | |
| uses: actions/cache@v4 | |
| with: | |
| path: .build | |
| key: ${{ runner.os }}-spm-${{ matrix.swift-version }}-${{ hashFiles('**/Package.resolved') }} | |
| restore-keys: | | |
| ${{ runner.os }}-spm-${{ matrix.swift-version }}- | |
| ${{ runner.os }}-spm- | |
| - name: Build | |
| run: swift build --verbose | |
| - name: Test | |
| run: swift test --verbose --parallel | |
| # Windows tests | |
| test-windows: | |
| name: Test Windows | |
| runs-on: windows-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| swift-version: ['6.0', '5.10'] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Swift | |
| uses: compnerd/gha-setup-swift@main | |
| with: | |
| branch: swift-${{ matrix.swift-version }}-release | |
| tag: ${{ matrix.swift-version }}-RELEASE | |
| - name: Cache Swift Package Manager | |
| uses: actions/cache@v4 | |
| with: | |
| path: .build | |
| key: ${{ runner.os }}-spm-${{ matrix.swift-version }}-${{ hashFiles('**/Package.resolved') }} | |
| restore-keys: | | |
| ${{ runner.os }}-spm-${{ matrix.swift-version }}- | |
| ${{ runner.os }}-spm- | |
| - name: Build | |
| run: swift build --verbose | |
| shell: cmd | |
| - name: Test | |
| run: swift test --verbose --parallel | |
| shell: cmd | |
| # Package validation | |
| validate-package: | |
| name: Validate Swift Package | |
| runs-on: macos-15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - name: Validate Package | |
| run: | | |
| swift package diagnose-api-breaking-changes baseline | |
| swift package compute-checksum | |
| swift package dump-package | |
| # Integration tests with real APIs (optional, requires secrets) | |
| integration-tests: | |
| name: Integration Tests | |
| runs-on: macos-15 | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - name: Run Integration Tests | |
| env: | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| run: | | |
| if [[ -n "$OPENAI_API_KEY" && -n "$ANTHROPIC_API_KEY" ]]; then | |
| swift test --filter IntegrationTests | |
| else | |
| echo "Skipping integration tests - API keys not available" | |
| fi |